Forum Moderators: not2easy

Message Too Old, No Replies

min-width in IE

Please help me solve this...

         

new2css

7:36 pm on Jan 4, 2008 (gmt 0)

10+ Year Member



Does anybody have a way to make a minimum width work for IE6 in strict xhtml? Right now I just have a min-width set for the body of my site, and it works great in FF and safari. In IE6 (I can't remember if it does the same thing in IE7), no min-width works, so the horizontal tabs don't stay inline when the page gets smaller, and that looks horrible (and makes me sick). Please help!

new2css

8:51 pm on Jan 5, 2008 (gmt 0)

10+ Year Member



Nevermind... I decided to bite the bullet and use the Javascript width:expression "* html" hack. It works very well, but now my CSS style sheet does not validate. If anyone has a valid way to do min-width in IE, please post.

penders

12:25 pm on Jan 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Does 'width' behave like min-width in IE6? In the same way 'height' behaves like min-height (in IE6). (?)

If so, then in strict mode you could set:

* html #container { 
width:NNpx;
}

But you seem to be using expression() to do this, so may be not?!

SuzyUK

1:50 pm on Jan 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For a valid way, put the expression (and any other IE6 workarounds) in a separate IE stylesheet and call that CSS via a Condtional Comment [webmasterworld.com] directed at IE6 and below

<!--[if lte IE 6]>
<link href="path/to/myie6.css" rel="stylesheet" type="text/css" media="screen">
<![endif]-->

This keeps the main stylesheet "hack free" and it's hidden from the validator.