Previous Message
Next Message

css-discuss archive

Sent by Erik Ratcliffe on 1 July 2004 23:11


On Thu, Jul 01, 2004 at 11:40:31AM -0700, Ian Skinner wrote:
> Is there a way to provide an effective minimum width to a div that works
> in IE 5.5 and 6?  I'm looking for a solution that will allow me to
> control the width of a two column layout with a floated left element and
> a main content element to the right so that the content does not drop
> below the floated div if the view window is sized below a certain
> threshold.  

Here's what I've done to circumvent IE's lack of "min-width"
support. This works because IE's "width" attribute acts like
"min-width", sort of ( in IE the width of a container can grow if 
its content requires more room).

div.something {
    width: 11em;
    }

html>div.something {
    width: auto;
    min-width: 11em;
    }

The first selector is for IE. The second selector won't be dealt
with by IE but will be seen by other browsers; it changes "width"
back to auto and sets "min-width" to whatever you want.

-- 
Erik Ratcliffe
[EMAIL-REMOVED]
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: