Help - Search - Members - Calendar
Full Version: Height and width properties in IE7
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
Christian J
According to http://css-discuss.incutio.com/?page=IE7 IE7 will support "min-height" and "min-width".

Does this also mean that IE6's incorrect renderings of "height" and "width" (that in practice work like W3C's "min-height" and "min-width") are fixed?
Frederiek
Maybe you'll find an answer here: http://www.d.umn.edu/itss/support/Training...gn/css.html#ie7
Christian J
I sent a test page to http://www.danvine.com/iecapture/ and it appears to get at least "height" right. I didn't test "width".
pandy
QUOTE(Christian J @ Oct 2 2006, 06:55 PM) *

Does this also mean that IE6's incorrect renderings of "height" and "width" (that in practice work like W3C's "min-height" and "min-width") are fixed?

Only height works the way you mean. Nothing wrong with width, I think.
Christian J
QUOTE(pandy @ Oct 2 2006, 09:45 PM) *

Only height works the way you mean. Nothing wrong with width, I think.


Long strings should overflow narrow containers, not expand them like IE6 does:

CODE
div {
width: 20px;
background: pink;
}

<div>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</div>

pandy
Sigh.
Christian J
You scared me there for a moment, so I had to test. Amazing how quick one forget things.
pandy
I don't think how IE handles width and height is especially similar to min-width and min-height but with hight there is at least a fraction of similarity.
Christian J
What's the difference, you mean? unsure.gif
pandy
Make IE do this or anything else remotely useful with its flexible width.

#someBlock { widht: 50%; min-width: 20em }


IE's tricks with width isn't useable for anything. It's a nuisance.
Christian J
That's true for normal block level elements. Since by default they expand to fit their parent container's width, it means any min-width smaller than that becomes meaningless. But how about a floated (or abs positioned) element?

CODE
<style type="text/css">
div {
float: left;
min-width: 100px;
background: pink;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
div {
width: 100px;
}
</style>
<![endif]-->

<div>
xxxxxxxxxxxxx
</div>
pandy
OK OK. tongue.gif
Maybe it's useful for a picture gallery or something. You still can't make it "do" anything if you don't put an unbreakable string or a big image in there.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.