inline css works but stylesheet does not, uhmmm

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Enddoc

inline css works but stylesheet does not, uhmmm

Post 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.
Enddoc

Re: inline css works but stylesheet does not, uhmmm

Post 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}?  :o
Enddoc

Re: inline css works but stylesheet does not, uhmmm

Post 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. ;D
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: inline css works but stylesheet does not, uhmmm

Post 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.
Enddoc

Re: inline css works but stylesheet does not, uhmmm

Post by Enddoc »

Thanks for the update 8)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: inline css works but stylesheet does not, uhmmm

Post by Dr.CSS »

{cms_stylesheet} will also take a / instead of [root_url]] as in (/uploads/...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: inline css works but stylesheet does not, uhmmm

Post 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.
Locked

Return to “Layout and Design (CSS & HTML)”