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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

min-width for ie6

  • 06-08-2009 4:07pm
    #1
    Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭


    I have my website looking perfect in all browsers except for IE6, which insists on stretching out to be the entire width of the page. I have min-width specified but it's ignoring it.

    Having searched on google, and found only messy solutions which don't really work, I'd like to hear how people on here approach this problem.

    My div needs to stretch in width to fit its content but should be at least 780px. Who would've thought this would be a problem?? :rolleyes:


Comments

  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    IE6 doesn't understand min-width. It will just ignore it.

    Instead, IE6 treats 'width' in the same way that most browsers treat 'min-width'. That is, if you set 'width' for IE6 the container will still stretch if the content is too long (most browsers will chop the content off, and rightly so).

    You can load a IE only stylesheet and add width declarations anywhere you should have min-width.


    If that all sounds confusing and annoying -- you're right. It is.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Hi thanks for your reply, I only just stumbled across that fact now.

    My problem is that I have a layout like so

    <div id="wrapper">

    <div id="header"></div>

    <div id="content"></div>

    </div>

    Header should be a div running the full width of the content div and located just above it.

    However, sometimes the content exceeds the min-width of 780px and when it does. the header should match it's width. This is where my problem is now :(


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    I have it working as it should in all browsers now except for IE7.

    My Doc type is strict but it's ignoring the min-width property and my div is expanding the full width of the page.

    Any suggestions?


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    John_Mc wrote: »
    Hi thanks for your reply, I only just stumbled across that fact now.

    My problem is that I have a layout like so

    <div id="wrapper">

    <div id="header"></div>

    <div id="content"></div>

    </div>

    Header should be a div running the full width of the content div and located just above it.

    However, sometimes the content exceeds the min-width of 780px and when it does. the header should match it's width. This is where my problem is now :(

    min-width definitely wouldn't solve that.

    Will setting the header to 100% work, using an IE conditional width of 780 for the wrapper ?

    Failing that, check out jQuery and set the header width to the width of the content.


Advertisement