How to make IE respect max AND min-width [duplicate]


Tags: html,css,internet-explorer

Problem :

Possible Duplicate:
How to make IE support min-width / max-width CSS properties?

I have a site that has it's main navigation in a list (floated left).

The li elements need to have a min AND max width. This css of course works fine in all good browsers. But IE (9) doesn't react to it.

    ul.dropdown li {
            line-height: normal;
                    text-align: center;
            max-width: 145px;
            min-width: 88px;
            min-height: 30px;
        }

If I use this code on one condition, for example max width IE respects it. http://perishablepress.com/maximum-and-minimum-height-and-width-in-internet-explorer/

But of course I can't use the same for min-width.

I need a solution that IE respects max AND min width.

Is there a solution?

Thank You!


edit: I forgot to mention i already added

<!DOCTYPE html>

;)



Solution :

Ok, I found the problem. It wasn`t in the code, my IE just automatically switched into Quirks mode. Changed it by going in the console (F12) and changed the Document Mode to IE9!

Thank You!


    CSS Howto..

    How to properly align rows with bootstrap

    tooltip box not showing using css

    How to change the color of an active h5 tab using jQuery or CSS

    How do you style/select inline-block elements in the first row when in a flexible container?

    How to make text appears alitter above using html and css

    How to do Vertical+Horizontal centering in CSS

    How can I build a flexible ratings widget in LESS instead of straight CSS?

    How to specify different Css for different Mobiles (BB, Iphone, Nexus… )

    How to hide div for specific height or width using CSS [duplicate]

    How to freeze frame with css

    how to set border in firefox

    How to float Dojo DropDownMenu over a table cell

    CSS: How to make background color around text not flush to the text?

    How to put text in the upper right, or lower right corner of a “box” using css

    How to get innerHTML of a node using scrapy Selector?

    How to import CSS from node_modules in webpack angular2 app

    How to add style/css to a simple jQuery accordion?

    How to select all cell starting, containing or ending with some word with JQuery/CSS?

    Added ellipsis for long text but it showing below the text

    How To Insert Some Content Before An HTML Element In The Runtime Using CSS

    How can I get width and height of big image after displaying it on html-page?

    How do I get a floating footer to stick to the bottom of the viewport in IE 6?

    how to insert a ribbon inside a div how background without images only pure css? [closed]

    how do i get an div to stay in place while text around it gets bigger or shorter

    How to Auto set the height of a div using the height of another div

    CSS causing red frame around lightbox image - how to remove?

    How to HTML/CSS Limit / Clip / Mask an object?

    How to select nth line of text (CSS/JS)

    How to make 1 css value dependent on another?

    In CSS, how can I give two styles to same div according to its level on a
      list?