Grow your CSS skills. Land your dream job.

Aligning Content

  • # May 18, 2011 at 10:39 am

    I have been having issues getting two divs to align on the same line in IE7, works correctly in all other browsers.

    CSS:

    body {
    padding: 0;
    margin: 0;
    color: #000;
    background-color: #B8D9F5;
    }
    div#wrapper {
    clear: both;
    width: 678px;
    margin-left: auto;
    margin-right: auto;
    background-color: #FFF;
    }
    div#content {
    overflow: auto;
    margin: 0;
    padding: 0 0 20px 0;
    min-height: 200px;
    width: 478px;
    background-color: #FFF;
    }
    div#asideWrapper {
    float: right;
    margin-top: 10px;
    margin-right: -10px;
    }
    div#aside {
    float: right;
    width: 188px;
    height: auto;
    clear: right;
    border: 1px solid #D4D4D4;
    background: #e0f1ff;
    margin-bottom: 20px;
    }

    HTML:










    Title




    Title








    Content goes here...






    # May 18, 2011 at 4:21 pm

    resolved my own issue…by removing the float from the wrapper.

    div#asideWrapper {
    margin-top: 10px;
    margin-right: -10px;
    }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".