Help aligning 120x600 ads left outside site

Discussion in 'CSS' started by StephenRox, Sep 19, 2013.

  1. #1
    Hello
    I'm struggling to put a 120x600 banner ad on the left and the right of my website on the outside of the site page but I can't get it to work.

    I'm using the following:
    Here goes the CSS
    
    #leftAds { width:120px; height:600px; position:absolute; left:20%; top:3%; }
    Code (markup):
    And this is the page:

    And the disappointing result:

    Internet Explorer
    http://i.imgur.com/LEI6PFz.jpg

    In Firefox works fine
    http://i.imgur.com/6PC0xao.jpg

    Any idea how to fix this? Thank you.
     
    StephenRox, Sep 19, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Absolute positioning of an ad without any margin/padding on the content is usually problematic at best, particularly with IE on the table. Generally speaking, taking elements out of flow is just begging for a broken layout.

    That said: tables for layout, DIV inside the table where you CANNOT have a DIV (only tags that can be direct children of TABLE are CAPTION, TBODY, THEAD, TFOOT or TR (though in the case of TR, TBODY is assumed)... you're already into the laundry list of how not to build a website with decade and a half out of date methodology, and you don't even have real content yet.

    Seriously, whoever gave you the idea to use a table that way or that you could put that advert DIV where you did, needs a good swift kick in the crotch.
     
    deathshadow, Sep 20, 2013 IP