larson88 Posted November 9, 2010 Share Posted November 9, 2010 Ok why if I put a border on the body tag... it only wraps around the text i have on the page... not around the entire view space... but if u put a onClick on it.. clicking outside of the borders still tiggers it... and why does editing the body's background edit the entire space if the body border is like the top 15px.... wtf? is the body tag special? and is this normal behavior? Quote Link to comment https://forums.phpfreaks.com/topic/218160-body-issues/ Share on other sites More sharing options...
gizmola Posted November 9, 2010 Share Posted November 9, 2010 Take a look at this: http://www.w3.org/TR/CSS2/box.html Quote Link to comment https://forums.phpfreaks.com/topic/218160-body-issues/#findComment-1132067 Share on other sites More sharing options...
larson88 Posted November 9, 2010 Author Share Posted November 9, 2010 i know about the box model lol, when i added a border style to the body tab... it extended 100% width and enough height to fit the text... so why does the background color of the body cover the whole page... and why does clicking anywhere trigger the body onclick, even if i click outside the border line... Quote Link to comment https://forums.phpfreaks.com/topic/218160-body-issues/#findComment-1132069 Share on other sites More sharing options...
gizmola Posted November 9, 2010 Share Posted November 9, 2010 Right away, if you actually knew the box model, you would know that the margin sits outside the border. Did you examine any of your assumptions? For example... what is the "body?" Is it a box? What is it's model? If you don't specify properties specifically, what are the default parameters for things like the margin? Is the body contained by anything? What about the DOM? How about this? http://dbaron.org/css/test/rootbox Quote Link to comment https://forums.phpfreaks.com/topic/218160-body-issues/#findComment-1132077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.