IE6 Pushing Content Box Down

Discussion in 'CSS' started by sunster13, Jan 9, 2008.

  1. #1
    Hi,

    I need some help here with CSS. I coded a site, which looks perfect in IE7 and FF, but realized that that's not the case in IE6.

    The site is: http://www.tlcomputers.ca

    As you can see (if you have IE6), that the main content box is pushed below the left panel. What's weird, is that the products page works perfectly fine.

    One other thing I noticed, if I change

    .panel_text {
    padding: 10px 15px 0px 10px;

    to

    .panel_text {
    padding: 10px 0px 0px 10px;

    it works. Only problem is is that the text isn't aligned anymore then.

    Here's the link to the CSS:

    http://www.tlcomputers.ca/style.css

    Anyone know the issue?
    Thanks.
     
    sunster13, Jan 9, 2008 IP
  2. manishk

    manishk Peon

    Messages:
    63
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This will solve your problem:

    CSS:
    
    .panel_text {
    	padding: 10px 0 0 30px;
    	color: #a3abb7;
    	font-size: 11px;
    }
    
    Code (markup):
    There could be other errors in your CSS. You should also search & read about box model.
     
    manishk, Jan 9, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Except that removes his right padding for the text.

    Since your left panel content comes before the main in the source, you could just float the left but leave the right, giving it a left margin of 142 or so px. Then IE can't bitch about there not being enough room because the main content won't have a set width.
     
    Stomme poes, Jan 10, 2008 IP
  4. sunster13

    sunster13 Active Member

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Thanks.

    I tried it, still had the same effect though. I put the left margin to 238px, it shows up good in all the browsers, except IE6. Still pushes it below the left panel for some reason.
     
    sunster13, Jan 10, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I added up main (492px) and panel (238px) and got precisly 730px (which is what your wrapper is). IE6 is either doing the three-pixel jog, or possibly doubling the margins (since you're floating both). Three pixels would be enough to make IE6 think it's got 238 + 492 + 3 =more than wrapper (730).

    I don't KNOW that it's three pixel jog, or one of the other pixel-adding bugs (you can read about them here).

    One possible way out of this is to give something a negative margin somewhere of 3 pixels. Since you're floating the main right, you could give main a negative left margin of 3 pixels. But read that page, because 3-pixel isn't the only possible culprit and sometimes there are two or three bugs working at once.

    Let us know.
     
    Stomme poes, Jan 11, 2008 IP
  6. sunster13

    sunster13 Active Member

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    Turns out that all the scripts, along with the horizontal rules were the culprits. The width of the scripts all fit the width of the panel, but did not fit if you include the space taken away by the margins. I just lowered the width to fit the actual width and it worked. Also I had a hr class because I wanted it an image, but it was creating the same problem. I didn't check to see if it was the width of it as well, but instead simply inserted an image in the html.

    Thanks a lot though Stomme poes.
     
    sunster13, Jan 11, 2008 IP