Page 1 of 1
inline css works but stylesheet does not, uhmmm
Posted: Sat Dec 04, 2010 5:11 am
by Enddoc
I have tried and tried to get my stylesheet to work as:
body{
background-image:url(uploads/images/circuit.gif);
color:#222222;
line-height:1em;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: large;
font-family: Verdana, Geneva, sans-serif;
}
Never, oh never do I get the background image...but this works -- in the template
Why? Is this screwy or what!!! Same code
Anyone know why? Please help me.
Re: inline css works but stylesheet does not, uhmmm
Posted: Sat Dec 04, 2010 5:18 am
by Enddoc
I change {cms_stylesheet} to {stylesheet} after reading a earlier post and that fixed it.
Okay what's the meaning of {cms_stylesheet} over {stylesheet}?

Re: inline css works but stylesheet does not, uhmmm
Posted: Sat Dec 04, 2010 5:28 am
by Enddoc
Well, well the real answer is {cms_stylesheet} we should but we must put [[root_url]] as:
body{
background-image:url([[root_url]]/uploads/images/circuit.gif);
color:#222222;
line-height:1em;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: large;
font-family: Verdana, Geneva, sans-serif;
}
Now that works, hehe.

Re: inline css works but stylesheet does not, uhmmm
Posted: Sat Dec 04, 2010 7:33 am
by Wishbone
{cms_stylesheet} is cached in a file in /tmp, while {stylesheet} CSS is fetched from the database each time. When specifying a relative path, it is relative to the stylesheet (/tmp), not the web page.
When using inline styles, it is relative to the web page.
Re: inline css works but stylesheet does not, uhmmm
Posted: Sat Dec 04, 2010 8:57 pm
by Enddoc
Thanks for the update

Re: inline css works but stylesheet does not, uhmmm
Posted: Sun Dec 05, 2010 3:00 am
by Dr.CSS
{cms_stylesheet} will also take a / instead of [root_url]] as in (/uploads/...
Re: inline css works but stylesheet does not, uhmmm
Posted: Sun Dec 05, 2010 4:52 am
by Wishbone
Dr.CSS wrote:
{cms_stylesheet} will also take a / instead of [root_url]] as in (/uploads/...
As long as it's in the root folder.. I think it's better to use [[root_url]], so that if you have to move the install, the stylesheet is one less thing to have to update.