21303 Posts in 5736 Topics by 2603 members
|Go to End|
15 July 2009 at 7:51am Last edited: 15 July 2009 8:43am
For some reason when I refresh that pages. Or do a /dev/build on my site. The css background images are disappearing.
The layout seems to be fine, it is just the background images that are linked in my css file, one minute they are there
and then I refresh or dev/build and they are gone.
I REALLY REALLY NEED TO FIX THIS PROBLEM. Please help me.
I thought that it was a problem with my browser, but for some reason I do not know how to get it back?
Has anyone else had trouble with this?
here is the link to the site:
15 July 2009 at 9:00am
Using Firebugs Net panel you can see any 404ing requests. It looks like you are going 1 level to high. The path for the images is themes/images/navbg.jpg I am guessing it should be themes/mustangclassic/images/navbg.jpg. In your CSS this should be url(../images/... rather then url(../../images).
15 July 2009 at 2:27pm
The problem with the template is that I was directly linking to the css files in my template
<link rel="stylesheet" type="text/css" href="mustangclassic/css/layout.css" />
<link rel="stylesheet" type="text/css" href="mustangclassic/css/typography.css" />
<link rel="stylesheet" type="text/css" href="mustangclassic/css/form.css" />
My CSS files were doubling up whenever it would process the page.
SilverStripe was choosing the first available layout when it would load.
I deleted the direct link to the css above and replaced it with this:
<% require themedCSS(layout) %>
<% require themedCSS(typography) %>
<% require themedCSS(form) %>
Of course the only way that this works in this instance is if your css files are named exactly as above
Thank you very much for your help!
15 July 2009 at 2:47pm Last edited: 15 July 2009 2:48pm
It was including it twice as you probably had a Requirements() call in your page.php file which loaded those files automatically. See mysite/code/Page.php for the existing requirements
|Go to Top|