Jump to:

3448 Posts in 1032 Topics by 873 members

Template Questions

SilverStripe Forums » Template Questions » Trouble with header image

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

Page: 1
Go to End
Author Topic: 1319 Views
  • CurrysLake
    Avatar
    Community Member
    7 Posts

    Trouble with header image Link to this post

    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.

  • Devlin
    Avatar
    Community Member
    215 Posts

    Re: Trouble with header image Link to this post

    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.

  • CurrysLake
    Avatar
    Community Member
    7 Posts

    Re: Trouble with header image Link to this post

    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!

    1319 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.