Jump to content

Set A Height Issue


ckrudelux
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...