Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

IE min-width hack

Options
  • 29-03-2006 4:07pm
    #1
    Closed Accounts Posts: 240 ✭✭


    Hi,

    I've tried a few things to get this to work. The one I've found to be closest to a true min-width function for IE is:
    width:expression(document.body.clientWidth < 600 ? "600px" : "90%" );
    
    This is new to me, but apparently the expression tag is propietary to IE, so other browsers ignore it. The rest is just saying if the client (IE) width is less than 600 then set the element's width to 600px, if not then let it be 90%.
    I'm happy enough with the result this gives, but the css doesn't validate when this is used.
    I've a few questions then:
    Is this method using Javascript?
    Is there a better way to get min-width to work in IE?
    What's the implication of an invalid css file (this will be the only invalid entry)?

    Thanks in advance for any feedback.


Comments

Advertisement