CSS min width div does not force its container to be the right size as expected

I have a DIV that need a minimum width. I cannot use CSS min-widthas a non-cross browser. I created an inner div with a set width. When the browser is smaller than this inner div, I get a scrollbar as expected.

The problem is that the outer div holds less than the inner div.

See here for an example.

I would expect the blue to be as wide as yellow.

What is wrong with my CSS?

+5
source share
2 answers

min-width , IE6. IE6, min-width .

IE6, IE6 width ( height) , min-width ( min-height). :

#outer {
    width: auto !important;
    width: 1000px;
    min-width: 1000px;
}

IE6 width ( min-width), !important . width - auto min-width - 1000px.

, . : http://jsfiddle.net/6e6yX/6/. , ?

+7
+1

All Articles