Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Trouble with header image


Go to End


3 Posts   1984 Views

Avatar
CurrysLake

Community Member, 7 Posts

8 April 2011 at 12:54pm

good evening. I'm trying to have a banner image display in the header of my site. I am using 2.4.5 and I have added the following code to layout.css

#Header {
width: 850px;
height: 137px;
backgroud: url("../images/headerclouds.jpg");
margin: 0 auto;
overflow: hidden;
}

I have tried using this code in Firebug to see how it looks and it works there, however when I add it to the actual layout.css file and upload to the server, it loads all of the items except the background. I verified this by pulling up firebug and it does not show the background line and displays a blank background, however if I switch it to show me the source instead of the live view, the line is in the file.

Any help is greatly appreciated.

Avatar
Devlin

Community Member, 344 Posts

8 April 2011 at 7:48pm

Edited: 08/04/2011 7:48pm

backgrou*n*d: url("../images/headerclouds.jpg");

If you're using Requirements::combine_files() on the live server, you also want to change the path to "../../mysite/images/headerclouds.jpg", which works with not combined_files() on the dev server too.

Avatar
CurrysLake

Community Member, 7 Posts

9 April 2011 at 12:50am

That was it. I can't believe I missed that. I actually retyped that line several times to try to fix any typos, but I guess after looking at it for so long, you read what is supposed to be there instead of what is actually there.

Thank you very much!