Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3598052
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:11:40+00:00 2026-05-18T20:11:40+00:00

and thanks for the help. I am having a somewhat confusing issue with IE7

  • 0

and thanks for the help.

I am having a somewhat confusing issue with IE7 when using margins.

I have a contaner, and inside that container I have some floated boxes.

These boxes have margins applied, top, right, left, bottom, except the first box that has no margin on the left, and the last box that has no margin on the right.

Looks fine in all browsers except IE7, where the margin is not applying for the first element in each row (at least this is what I think is happening.

If I remove margin right in ie7 using the dev tools and then check it back on it displays correctly.

Has anyone seen anything like this before?

I am stumped.

EDIT
It appears to being caused by position:relative on the container divs. Changing this back to static fixes the margin issue, but now means my divs are mis aligned in ie7. Does anyone know why position relative would screw up margins??

NEW EDIT
Example download can be found here:
http://www.jimplode.co.uk/content/stackoverflow.zip

Incorrect view
Incorrect

Correct Margins, after unchecking and rechecking just one of the margin styles.
Correct

The HTML:

<div class="lowerContent">
    <div class="mediumContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginBottom">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
                                            <div class="textContainer">
                                                <h1>Car Insurance</h1>
                                                <ul>
                                                    <li>Protected NCD for life</li>
                                                    <li>NCD Accelerator</li>
                                                    <li>European Cover Included</li>
                                                    <li>Multiple Drivers and Vehicles</li>
                                                    <li>Breakdown Cover Included</li>
                                                    <li>Legal Cover Included</li>
                                                </ul>
                                                <div class="boxButtons">
                                                    <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                                </div>
                                            </div>
                                            <div class="imageContainer">
                                                <img src="/images/misc/boxphoto_1.jpg" alt="box image 0" />
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft contentBoxMarginRight contentBoxMarginBottom">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
                                            <div class="textContainer">
                                                <h2>Home Insurance</h2>
                                                <div class="imageContainer">
                                                    <img src="/images/misc/boxphoto_2.jpg" alt="box image 2" />
                                                </div>
                                                <ul>
                                                    <li>Working at home Equipment</li>
                                                    <li>Helmet and Leathers</li>
                                                    <li>Legal Cover</li>
                                                    <li>Caravan Cover</li>
                                                    <li>Personal Accident Cover</li>
                                                </ul>
                                                <div class="boxButtons">
                                                    <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                                </div>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft contentBoxMarginBottom">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
                                            <div class="textContainer">
                                                <h2>Life Insurance</h2>
                                                <div class="imageContainer">
                                                    <img src="/images/misc/boxphoto_3.jpg" alt="box image 3" />
                                                </div>
                                                <ul>
                                                    <li>Cover From &pound;5 a month</li>
                                                    <li>Your loved ones protected</li>
                                                    <li>Immediate cover available</li>
                                                    <li>We search, you save</li>
                                                </ul>
                                                <div class="boxButtons">
                                                    <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                                </div>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>
                    <div class="emptyClear"></div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginRight">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
                                            <div class="imageContainerAlternate">
                                                <img src="/images/misc/boxphoto_4.jpg" alt="box image 4" />
                                            </div>   
                                            <div class="boxButtons">
                                                <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginLeft">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
                                            <div class="imageContainerAlternate">
                                                <img src="/images/misc/boxphoto_5.jpg" alt="box image 5" />
                                            </div> 
                                            <div class="boxButtons">
                                                <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginLeft">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
                                            <div class="imageContainerAlternate">
                                                <img src="/images/misc/boxphoto_6.jpg" alt="box image 6" />
                                            </div> 
                                            <div class="boxButtons">
                                                <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft">

                            <div class="expandableBox">
                                <div class="topLeft">
                                    <div class="topRight">
                                        <div class="top"></div>
                                    </div>
                                </div>
                                <div class="middleLeft">
                                    <div class="middleRight">
                                        <div class="middle">
                                            <img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
                                            <div class="imageContainerAlternate">
                                                <img src="/images/misc/boxphoto_7.jpg" alt="box image 7" />
                                            </div> 
                                            <div class="boxButtons">
                                                <a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
                                            </div>
                                            <div class="emptyClear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="bottomLeft">
                                    <div class="bottomRight">
                                        <div class="bottom">
                                        </div>
                                    </div>
                                </div>
                            </div>

                    </div>
                    <div class="emptyClear"></div>
</div>

The CSS:

    .lowerContent
    {
        position:relative;
        margin:0px 0px 0px 0px;
    }

    .expandableBox
    {
        display:block;
        width:100%;
    }

    .expandableBox .top
    {
        background-image:url("/images/backgrounds/bkg_whitebox_t.png");
        background-repeat: repeat-x;
        height:10px;
    }

    .expandableBox .topLeft
    {
        height:10px;
        padding:0px 0px 0px 10px;
        background-image:url("/images/backgrounds/bkg_whitebox_tl.png");
        background-repeat: no-repeat;
        background-position:left top;
    }

    .expandableBox .topRight
    {
        height:10px;
        padding:0px 10px 0px 0px;
        background-image:url("/images/backgrounds/bkg_whitebox_tr.png");
        background-repeat: no-repeat;
        background-position:right top;
    }

    .expandableBox .middleLeft
    { 
        padding:0px 0px 0px 10px;
        background-image:url("/images/backgrounds/bkg_whitebox_l.png");
        background-repeat: repeat-y;
        background-position:left top;
    }

    .expandableBox .middle
    { 
        background-color:#FFFFFF;
    }

    .expandableBox .middleRight
    {     
        padding:0px 10px 0px 0px;
        background-image:url("/images/backgrounds/bkg_whitebox_r.png");
        background-repeat: repeat-y;
        background-position:right top;
    }

    .expandableBox .bottom
    {
        background-image:url("/images/backgrounds/bkg_whitebox_b.png");
        background-repeat: repeat-x;    
        background-position:bottom;
        height:10px;
        margin-bottom:7px;
    }

    .expandableBox .bottomLeft
    {
        height:10px;
        padding:0px 0px 0px 10px;
        background-image:url("/images/backgrounds/bkg_whitebox_bl.png");
        background-repeat: no-repeat;
        background-position:left bottom;
    }

    .expandableBox .bottomRight
    {
        height:10px;
        padding:0px 10px 0px 0px;
        background-image:url("/images/backgrounds/bkg_whitebox_br.png");
        background-repeat: no-repeat;
        background-position:right bottom;
    }




    .contentBoxMarginLeft
    {
        margin-left:10px;
    }

    .contentBoxMarginRight
    {
        margin-right:10px;
    }

    .contentBoxMarginTop
    {
        margin-top:10px;
    }

    .contentBoxMarginBottom
    {
        margin-bottom:10px;
    }
.fullContentBox
{
    width:940px;
    float:left;
}

.largeContentBox
{
    width:700px;
    float:left;
}

.mediumContentBox
{
    width:460px;
    float:left;
}

.smallContentBox
{
    width:220px;
    float:left;
}


.mediumContentBox .textContainer
{
    float:left;
    width:210px;
}

.mediumContentBox .imageContainer
{
    float:right;
    width:210px;
}


.smallContentBox .textContainer
{
}

.smallContentBox .textContainer .imageContainer
{
    float:right;
    padding:5px 0px 0px 0px;
}

.smallContentBox .imageContainerAlternate
{
    float:left;
    padding:0px 0px 0px 0px;
}

a.smallButtonLeft,
a.smallButtonRight
{
    display:inline-block;
    background-image:url('/images/backgrounds/bkg_sprites_buttons.png');
    height:30px;
    background-position:left top;
    background-repeat:no-repeat;
    padding:0px 10px;
    line-height:23px;
    color: #0F4DBC;
    font-family: Arial,Helvetica,sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-transform: capitalize;
}
a.smallButtonLeft:hover
{
    background-position:left -44px;
}

a.smallButtonRight
{
    background-position:right -217px;
    color: #4D4F52;
}
a.smallButtonRight:hover
{
    background-position:right -262px;
}


.boxButtons
{
    float:left;
    padding:10px 0px 0px 0px;
}

.smallContentBox .boxButtons
{
    width:200px;
    text-align:center;
}

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:11:40+00:00Added an answer on May 18, 2026 at 8:11 pm

    Could be something to do with margins collapsing. I would tempted to only have the margin on the left, then margin-left:0 on the first one.

    Alternatively, try our old friend “zoom:1” on the floated divs or the parent container. Often fixes a lot of the more obscure IE weirdness.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

and thanks for the help. I am having a somewhat confusing issue with IE7
Thanks to a library upgrade (easymock 2.2 -> 2.4), we're having tests that have
Thanks for reading this. I have markup similar to what is below. Using the
thanks for you help in advance. I'm having a bit of a trying time
I'm having a little struggle on this one and would appreciate some help. In
I'm having a bit of a strange issue that I can't quite figure out.
thanks in advance for your help. I am wondering if there is a (design)
thanks for all the help the last few days. I'm hoping someone knows this
Thanks for reading this. I am dynamically generating some data which includes a select
Edit Thanks for the suggestions; to clarify, we already use SSL, but that doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.