I'm working on a website and the <body>
tag doesn't stretch down the full length of the <html>
tag. Both have a min-height of 100% and I thought that meant the <body>
tag would adjust based on what it was embedded in, which is the <html>
tag. I've been changing values around in firebug to see if it would do anything but no dice.
Basically the height of <body>
ends up maxing out at 749.4px while the height of <html>
is 857px.
Any ideas?
Edit: Sorry guys, I got sidetracked after I posted this. Turns out one of the css files changed the body height or something. Basically I ended up just adding "height: 100%;"开发者_如何学JAVA to the tag, "min-height: 100%;" to any instance of and the wrapper class. I'm working with a weird template that the guy before me set up so I got kinda lost haha. I worded the question very strangely, too. If I opened up firebug and mouseovered the html tag it would highlight the whole window but if i highlighted the body tag the overlay would not fit the screen, meaning body was not extending as far as i wanted it to.
html, body {
height: 100%;
}
should work in most scenarios.
<html>
tag doesn't have style rules, it doesn't have width
nor height
. <body>
is the parent of them all when it comes to CSS.
精彩评论