Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS 100% width footer with image attached to top – HELP!

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #33319
    plaedien
    Participant

    Hi all.

    Im fairly new to hand coding in css/xhtml (read: Noob) and im really struggling with getting my footer to work correctly.

    Basically want i want to do, is have a 100% width footer in blue with an repeating image attached to the top of the footer. Simple right?

    Here is what i am trying to acheive with the footer:

    http://imageshack.us/photo/my-images/7/pdwebsitelayout.png/

    Ive hunted around and found what i though would work (using clear: both, etc) but no matter what i try, at the very most, all i get is the main blue area of the footer showing – i cant get the ‘grass’ image to show at all, let alone sit on top of the footer area.

    The footer does have content in it (block lists) but ive collapsed it all to make it easy to read:



    _____________________________

    and the relevant CSS :

    #container {
    margin: auto;
    width: 900px;
    }

    #footer {
    background: url(“images/grass-footer.png”) repeat-x scroll 0 0 #00539B;
    height: auto;
    width: 100%;
    position: absolute;
    margin: 30px 0 0 0;
    left: 0;
    }

    #footer .content {

    height: 160px;
    margin: 0 auto;
    position: relative;
    width: 900px;
    }

    #footer .footercontent {
    color: #ffffff;
    font: ‘helvetica’, ‘arial’;
    font-size: 10pt;
    width:900px;

    }

    _______

    Any ideas? this is driving me n00b brain crazy!

    Thanks

    #82622
    noahgelman
    Participant

    It’s hard to tell what’s going on without the html. It’s much easier to diagnose the problem if you have a link to the website

    #82623
    plaedien
    Participant

    mmm thats weird because i did paste it into the post…unfortunately web goblins have killed our server at the moment so there is
    nothing online.

    I will try again! Is there a way to copy and paste html into this comment so it just displays as code?

    #82627
    plaedien
    Participant

    ok our server is sorted – so here is the link to my testing page:

    http://www.petsdomain.com.au/testing/bg_test.html

    sorry if its messy code!

    #82628
    joshrives
    Member

    Like sl1dr said…it looks like the image doesn’t exist on the server

    #82630
    GeneralKnowledge
    Participant

    EDIT: @sl1dr hadn’t seen you had already said almost the same thing.
    Change

    background: background: url("images/grass-footer.png") repeat-x scroll 0 0 #00539B;

    to

    background: url("grass-footer.png") repeat-x 0 0;

    You appear to have acciendently put background twice and #00539B is the same colour as the grass so you cant see it.

    #82631
    plaedien
    Participant

    oops, the second background was a cut & paste mistake! but i see your point about the png not having a white background…

    well it worked!!!

    Thank you so much, that was driving me nuts. I guess my thinking was wrong about how the footer worked as well. I was assuming the image would display ON TOP of the footer area, but of course it would display AT the top not on it. makes perfect sense now.

    Thanks again! :D

    http://www.petsdomain.com.au/testing/bg_test.html

    #82632
    plaedien
    Participant

    one more question ;)

    Is there a way to get the blue area of the footer to go all the way to the bottom of the browser window? at the moment it displays some white as well if i resize the window…

    #82634
    plaedien
    Participant

    doesnt matter figured it out ;)

    #82636
    OniLinkCR
    Member

    One little detail buddy. The color of the bottom isn’t the same as the top of the grass and you can see the “change”. I know, it’s very hard to notice, but this is part of the pixel perfect philosophy. ;)

    #82653
    AntonNiklasson
    Participant

    I might be a bit picky sayin’ this. But what if you want to change the white background to, lets say, some gray tone in the future? Then the white grass background wouldn’t really fit in.

    By using the transparent png, and a slightly different css, you could go with whatever background color you want.

    #footer { background: url("grass-footer.png") repeat-x 0 0; }
    #footer .content { margin-top: height-of-grass-image; }

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.