Help - Search - Members - Calendar
Full Version: Body tag
HTMLHelp Forums > Web Authoring > Cascading Style Sheets

Glad I found this forum.

I have a very annoying problem. For one of my websites the <body> tag doesn't cover the whole page. So when I try to add a background image, the image only cover half of the page. I used the W3C validators, firebug, other validators etc. I really can't figure this out. I also tried to set height and width to the <html> en <body> tag but that didn't fixed my problem neither. I do have some html and css skills but this one I really can't figure out. Probably I don't see it anymore or I'm misreading something.

My website is currently in development and can be found here:

Please help.

Kind regards,

Christian J
This is probably a CSS issue, so I move the thread there.

What you describe might happen if you specify backgrounds for both the HTML (root) element and BODY, like this:

html {background-color: pink;}
body {background-image: url(dog.jpg);}

but the page links so many stylesheets that I can't look through them all. See also

There are also CSS errors: most of them seem to be due to unrecognized CSS3 properties and browser extensions, but this one sounds relevant here:

8 body Value Error : background-repeat repea is not a background-repeat value : repea

And you might have to clear any floats in the right places.
You might want to use Nicolas Gallagher's New micro clearfix hack for that.

Thanks for your reply!

I've fixed it. Problem was indeed a color for the <html> tag and a background for the <body> tag.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.