abch624 Posted March 29, 2009 Share Posted March 29, 2009 Hi All, I am having an odd problem!!! I have attached the css code for the body tag bellow body { background: #D9E6F7; font: .74em "Trebuchet MS" Verdana, Arial, sans-serif; margin:0; } I have also attached an image of the problem!!!. I would like the background colour to fill the screen not the way it is.... Please help with this Cheers - Zahid [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/ Share on other sites More sharing options...
FaT3oYCG Posted March 30, 2009 Share Posted March 30, 2009 add padding: 0; Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-796505 Share on other sites More sharing options...
abch624 Posted March 30, 2009 Author Share Posted March 30, 2009 No Luck!!!! Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-796695 Share on other sites More sharing options...
seaweed Posted March 30, 2009 Share Posted March 30, 2009 Install the Firefox web developer toolbar and use the outline feature to tell you what layer that is. It looks like maybe there's a missing DIV tag somewhere. Or try putting body height to 100%. Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-797081 Share on other sites More sharing options...
abch624 Posted March 30, 2009 Author Share Posted March 30, 2009 Tried all that. And my code is verified code so its some weird thing.... Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-797090 Share on other sites More sharing options...
wildteen88 Posted March 30, 2009 Share Posted March 30, 2009 What other css are you using? Applying the background to the body tag should affect the whole page. Have you modified the html tag at all? Does this happen in any other browsers? Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-797194 Share on other sites More sharing options...
ToonMariner Posted March 30, 2009 Share Posted March 30, 2009 body { background: #D9E6F7; font: .74em "Trebuchet MS" Verdana, Arial, sans-serif; margin:0; height: 100%; } You could style the html element.. html{background: #d9e6f7;} but this is not practical if you need different background colours on different pages... Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-797223 Share on other sites More sharing options...
louisstephens Posted April 6, 2009 Share Posted April 6, 2009 did you try using the "clear:both;" ? Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-802685 Share on other sites More sharing options...
ToonMariner Posted April 7, 2009 Share Posted April 7, 2009 what does the body tag have to clear??? Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-803883 Share on other sites More sharing options...
acialk Posted April 8, 2009 Share Posted April 8, 2009 Any chance of you posting both the html and css source code? We can see what the problem is then. It looks like you've got something layered on top of the background with a background color of white. Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-804185 Share on other sites More sharing options...
Axeia Posted April 8, 2009 Share Posted April 8, 2009 Use this at the very top of any CSS document to avoid this problem. html, body { margin: 0; padding: 0; width: 100%; height: 100%; } Link to comment https://forums.phpfreaks.com/topic/151652-csshtml-body-tag-background-color/#findComment-804322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.