- This topic is empty.
-
AuthorPosts
-
June 29, 2011 at 7:36 pm #33319plaedienParticipant
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
June 29, 2011 at 7:58 pm #82622noahgelmanParticipantIt’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
June 29, 2011 at 8:13 pm #82623plaedienParticipantmmm 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?
June 29, 2011 at 9:09 pm #82627plaedienParticipantok 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!
June 29, 2011 at 9:26 pm #82628joshrivesMemberLike sl1dr said…it looks like the image doesn’t exist on the server
June 29, 2011 at 9:38 pm #82630GeneralKnowledgeParticipantEDIT: @sl1dr hadn’t seen you had already said almost the same thing.
Changebackground: 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.
June 29, 2011 at 9:52 pm #82631plaedienParticipantoops, 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
June 29, 2011 at 9:55 pm #82632plaedienParticipantone 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…
June 29, 2011 at 10:22 pm #82634plaedienParticipantdoesnt matter figured it out ;)
June 29, 2011 at 10:30 pm #82636OniLinkCRMemberOne 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. ;)
June 30, 2011 at 4:52 am #82653AntonNiklassonParticipantI 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; } -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.