What am I doing wrong here? Incorrect Display.

Discussion in 'HTML & Website Design' started by WebDev Solutions, Dec 9, 2009.

  1. #1
    OK,

    I have recently added 3 advertisement blocks below my navbar at theps4forums dot com, and I have attempted to make them all appear on the same row, side by side. Please see the code below, this is what I have used. (I have starred out my affiliate link as this is against DP rules).

    <center><script type="text/javascript"><!--
    google_ad_client = "pub-*************";
    /* 250x250, created 09/12/09 */
    google_ad_slot = "8492790185";
    google_ad_width = 250;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script><a href='****************8' target='_blank'>
    <img src='http://img704.imageshack.us/img704/7209/****.jpg' border='0' alt='' />
    </a><script type="text/javascript"><!--
    google_ad_client = "pub-*************";
    /* 250x250, created 09/12/09 */
    google_ad_slot = "8492790185";
    google_ad_width = 250;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></center>
    Code (markup):

    So I enter the above code, and everything appears to display correctly for me in Firefox. The ads are lined up side by side, all on the same line. However, when I load the website in Internet Explorer, I see this:

    [​IMG]

    Can anyone please shed any light on what is wrong with my code? I don't understand why the ads load completely fine for me in one browser, but not in another.
     
    Last edited: Dec 9, 2009
    WebDev Solutions, Dec 9, 2009 IP
  2. wounded1987

    wounded1987 Well-Known Member

    Messages:
    2,914
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    150
    #2
    well a short solution will be to enter each one into a span class and give that span class float to the left, then place theme all 3 span classes into 1 big div, give that div display:block;
    that should place them in 1 line.
     
    wounded1987, Dec 9, 2009 IP
  3. jessicalore

    jessicalore Guest

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Just something extra here. Everytime I create a new website, I like to create a special CSS for IE7 and IE6, because those browser are really bad. Don't like them, but well, I think definitely your problem is related to the layout, IE is just reading all the code wrong. You can try make your template a little bit wider, something like 980 or bigger, in that way you can see if the layout is part of the problem.
     
    jessicalore, Dec 10, 2009 IP
  4. mili

    mili Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I think problem is with the browser not with the code. Firefox follows W3C standard while IE don't follows that, so both interpret the code in different manner, try to change the height and width of template, may be it works.
     
    mili, Dec 10, 2009 IP