Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Cascading Style Sheets _ Body tag

Posted by: meules Apr 13 2012, 06:24 AM

Hi,

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: http://meules1.webshopapp.com/

Please help.

Kind regards,

Meules

Posted by: Christian J Apr 13 2012, 06:43 AM

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:

CODE
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 http://www.w3.org/TR/CSS21/colors.html#background

There are also CSS errors: http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fmeules1.webshopapp.com%2F&profile=css21&usermedium=all&warning=1&vextwarning=&lang=en most of them seem to be due to unrecognized CSS3 properties and browser extensions, but this one sounds relevant here:

QUOTE
URI : http://assets.webshopapp.com/meules1/preset.css?46
8 body Value Error : background-repeat repea is not a background-repeat value : repea



Posted by: Frederiek Apr 13 2012, 07:46 AM

And you might have to clear any floats in the right places.
You might want to use http://nicolasgallagher.com/micro-clearfix-hack/ for that.

Posted by: meules Apr 13 2012, 12:57 PM

Christian,

Thanks for your reply!

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

Thx

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)