www.webdeveloper.com
Results 1 to 4 of 4

Thread: min-width issue with IE7/8

  1. #1
    Join Date
    Nov 2011
    Posts
    36

    min-width issue with IE7/8

    Hello all!

    I'm reverse engineering a site and fixing some problems I inherited. The site's local so I don't have a link for you but I hope I can clearly explain:

    I simply want a container div to expand horizontally to fit a child div which contains a table (but I wouldn't think the table matters)

    I set a min-width to the container and all's well in all browsers EXCEPT IE7/8...the container is expanding to the full screen!!!!

    I've poured over forums and found some really funky solutions but none of them worked. I've been building sites for YEARS and have never come across this issue!

    Here's the css for the 2 containers. The 'width:expression' was the latest thing I tried but it didn't work.

    Thanks so much for your help!

    #containerMain {
    min-width: 940px !important;
    width:expression(document.body.clientWidth < 940? "940px": "auto" );
    margin: 0px;
    padding: 0px;
    display:inline-block; /* needed for min-width to work */
    }

    #containerPage {
    margin: 12px 0px 20px 12px;
    padding-top:14px;
    min-width: 917px !important;
    width:expression(document.body.clientWidth < 917? "917px": "auto" );
    display:inline-block;
    }

  2. #2
    Join Date
    Mar 2011
    Posts
    1,136
    IE7 doesn't support min/max properties, so you can give up on that. But IE8 does. So you might need to check if there's some other property that's supported in IE9 that isn't supported in IE8 that has an impact here. It's tough to say without seeing more of your code, including the HTML.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Nov 2011
    Posts
    36
    Thanks Rick!

    I actually grabbed the code so I can get it online with you guys. The site's stripped down (missing graphics, etc.) but you'll be able to see my issue. In IE7/8 the container stretches across the browser...all's fine in other browsers.

    http://siphon-marketing.com/clients/touch/

    I'm completely stumped!

    Len

  4. #4
    Join Date
    Nov 2011
    Posts
    36
    ALRIGHTY!

    I found a typo in one of the divs which is the reason why NONE of the fixes I found online worked!

    Soooo...it's now working in IE8 but still not in IE7.

    Can somebody out there take a peak at the latest page and bail me out?

    www.siphon-marketing.com/clients/touch

    Thanks so much!

    Len

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles