• 0

Broken IE or Broken CSS?


Question

What i need is to have a 120x600 vertical ad banner on the left side of a page. The problem is that using Internet Explorer the ad banner is totally messed up.

 

Internet Explorer:

LEI6PFz.jpg

 

Firefox:

6PC0xao.jpg

 

And the CSS:

#left {
    position:absolute;
    top:35px;
    left:20%;
    width:120px;
    height:600px;
 }

Any idea how to fix this? Thank you.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Right well you've placed it after your content in the document and are trying to move it outside the document flow with a absolute percentage positioning. This wont work. Try resizing your chrome/firefox to a smaller window size and you have the same problem where it will always be 20% away from the left border of the window.

 

You'd be much better off moving the #left div before your table and just using floated elements. 

<style>
#container {
    margin:0 auto;
    width:960px;
}
#left {
    width:120px;
    margin-right:100px;
    float:left;
} 
table {
    float:left;
}

</style>

<body>
    <div id="container">

        <div id="left">
            // Google code here
        </div>

        <table>
            //Table content here
        </table>

    </div>
</body>
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.