#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Min-width in IE7...PLEASE HELP


    Hello all!

    I've tried EVERYTHING and cannot squash this IE7 bug I'm getting with min-width.

    Here are my styles:

    Code:
    #containerMain      {
    	min-width: 940px !important;
    	
    	/* background-color: White;
    	background-image: url(../images/bkgdPage.gif); */
    	background-repeat: no-repeat;
    	margin: 0px;
    	padding: 0px;
    	display:inline-block !important; /* needed for min-width to work */
    }
    
    #containerPage {
      background-color: White;
      margin: 12px 0px 20px 12px;  
      padding-top:14px;
      min-width: 917px !important; 
      display:inline-block !important;  
      /* border: 1px solid Green; */
      -webkit-box-shadow: 0px 0px 4px 2px #999999;
    	box-shadow: 0px 0px 4px 2px #999999; 
    }
    I simply want the contents to stretch the outer container. In IE7 the container stretches the entire screen width!

    Can someone bail me out?

    Len
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Welcome to DevShed Forums, lprintz.

    Do you have an example page you could show us? Have you tried something like setting "max-width:100%"?

    New users are restricted from posting URLs until they have made 5 posts. You may need to get around this by leaving out the "http://" and putting a space before each ".". Yes this rule is annoying, but the administrators say it's necessary for limiting spam.

    By the way, it seems odd to me to have "-webkit-box-shadow" and "box-shadow" without "-moz-box-shadow" (even though the last is only needed in FF3.5.x and FF3.6.x).
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    Thank you!

    I do have a page to see but didn't know how to get around the URL restriction

    siphon-marketing . com / clients / touch

    Hope this helps!
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    IE7 only partially supports "display:inline-block". But even when I try using "float:left" instead, IE7's shrink-wrapping seems much weaker than other browsers.

    I don't see a way to make this work in IE7 without using some JavaScript to set the widths on "#containerHeader" and "#containerFooter".

    By the way, "cursor:hand" is an IE only thing. IE6 and newer support "cursor:pointer", which is the correct alternative.

    Are you aware that your page contains errors? The first step in debugging should always be making sure that your code is valid (in order to rule out any errors as the cause for the problem).
    http://validator.w3.org/
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    Thanks Kravvitz!

    Yeah...I know the site's a mess! I inherited this and was contracted to fix this min-width issue only to find that there are serious problems!

    I recommend a complete 'recode' but client won't be too happy

    We're actually going to leave IE7 'as is' and call it a day.
  10. #6
  11. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    You're welcome.

    Yeah, I would prefer to just leave that kind of thing "as is" too. It only looks a little odd, not severely broken at all.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo