[WSG] advice re min-height

2004-04-22 Thread Vaska . WSG
I'm not sure if my understanding of min-height is correct.  What I want 
to do is set a min-height on a div and then when there is too much info 
it will automatically expand itself.

Apparently, I need to use height as well for M$ browsers but what I 
don't quite understand is how do the other browsers properly interpret 
that when you have both a height and a min-height...?

Wouldn't it possibly be easier to just use height and then 
overflow:visible to achieve the same effect?

I can test around with this but I'm curious if there is a best-practice 
for this kind of thing...

Thanks for any thoughts...v

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] advice re min-height

2004-04-22 Thread Darian Cabot
G'day

Min-height and max-height are used for constraining an element. If an
object in the element is smaller than min-height, then the element's
height will be min-height. On the other hand, if the object is bigger than
the element, the max-height will determine the element's height. That's
what should happen, where the browsers actually do this is another story.

My understand is that 'min-height' isn't really supported by most
browsers. Or only partially supported. I could be wrong because I haven't
checked this on one of those browser compatibility charts, but I've never
been able to get IE to work with it. Personally I steer clear of it for
the time being.


Darian Cabot
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Cabot Consultants Pty Ltd
Software Engineer / Website Design
http://www.cabotconsultants.com.au
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


 I'm not sure if my understanding of min-height is correct.  What I want
 to do is set a min-height on a div and then when there is too much info
 it will automatically expand itself.

 Apparently, I need to use height as well for M$ browsers but what I
 don't quite understand is how do the other browsers properly interpret
 that when you have both a height and a min-height...?

 Wouldn't it possibly be easier to just use height and then
 overflow:visible to achieve the same effect?

 I can test around with this but I'm curious if there is a best-practice
 for this kind of thing...

 Thanks for any thoughts...v

 *
 The discussion list for http://webstandardsgroup.org/
 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
 *

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] advice re min-height

2004-04-22 Thread Andrew Krespanis
Assigning a height and overflow:visible will cause the contents to overlap 
the bottom edge of the containing element, not a good look.
IE treats height as min-height anyway, stretching a parent element to fit 
its children.
The workaround for this is to take advantage of one of IE's many bugs to 
send a height to it specifically, and provide min-height to everything else.
Here's an example

* html body #container {height:20em;} /*--Only IE pretends that there is 
another element outside html, all other browsers know better. */

#container {min-height:20em;}

Too easy :D
Andrew Krespanis.
_
Protect your inbox from harmful viruses with new ninemsn Premium. Go to   
http://ninemsn.com.au/premium/landing.asp?banner=emailtagreferrer=hotmail

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
*