Jump to content

Set A Height Issue


ckrudelux

Recommended Posts

Is where a why to make a mininum height that will fill 100% of my window height.

<body><div id="height">The hight of this div will be mininum 100% of my window height</div></body>

Have tride to make this work, but I only get the right result in opera.

Link to comment
Share on other sites

First, you'll have to give the html and body elements 100% height, after that, you can use the min-height property in CSS.Like this:

html,body { height: 100%; }#height { min-height: 100%; }

Internet Explorer 6 doesn't handle min-height, however, it treats height as if it were min-height. Developers usually use conditional comments to give a height attribute to Internet Explorer 6.I'm not sure if Internet Explorer 7 can use min-height, but I think it does.

Link to comment
Share on other sites

First, you'll have to give the html and body elements 100% height, after that, you can use the min-height property in CSS.Like this:
html,body { height: 100%; }#height { min-height: 100%; }

Internet Explorer 6 doesn't handle min-height, however, it treats height as if it were min-height. Developers usually use conditional comments to give a height attribute to Internet Explorer 6.I'm not sure if Internet Explorer 7 can use min-height, but I think it does.

thanks :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...