Ads in the far left border?

Discussion in 'Web Design and Development' started by ElectricMan5, Sep 18, 2009.

  1. ElectricMan5 macrumors regular

    Joined:
    Jul 22, 2008
    #1
    Hi, I'm trying to get a vertical ad on Google Adsense to show up on the far left portion of my site, but in the CSS there are borders, and I don't know how to get JUST the ad to go there.

    A screenshot of the template is attached...


    Thanks!
     

    Attached Files:

  2. RonCarr macrumors regular

    RonCarr

    Joined:
    Sep 12, 2007
    Location:
    Tennessee
    #2
    Just put the code for the ad in that section. I am guessing that you probably have the body and then a div for your content so just put it in the body and position it to be in the left margin.
     
  3. ElectricMan5 thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #3

    Thanks I'll try that.

    EDIT: YES!!! It worked! Thanks a lot man!
     
  4. ElectricMan5 thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #4
    Hmm... I seem to have another problem now. I used this code as the first thing in the <body> tags, so it wasn't aligned with the rest of the content in the DIV tag for the content:

    Code:
    <DIV style="position: absolute; top: 190px; left: 5px; width: 150px; height: 200px"><script type="text/javascript"><!--
    google_ad_client = "pub-2903055079924337";
    /* Vertical Guitar Pilot ad */
    google_ad_slot = "7936521350";
    google_ad_width = 120;
    google_ad_height = 600;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></DIV>
    The only problem is, since the position is absolute, the ads stay in the same place, even if the page is resized, so in a different sized browser, where text is a bit larger, the ads are overlapping the text.

    An screenshot is attached...

    Can anyone solve this?

    Thanks!
     

    Attached Files:

  5. RonCarr macrumors regular

    RonCarr

    Joined:
    Sep 12, 2007
    Location:
    Tennessee
    #5
    Yeah you won't be able to use absolute positing for the ad divs. I will be honest though, I don't know much about positioning for things like this. Perhaps someone else will read the thread and comment.

    The good thing is that the ads are where you want them, now comes the part where you have to keep playing with layout and positioning to figure out how to work the resizing.
     
  6. RonCarr macrumors regular

    RonCarr

    Joined:
    Sep 12, 2007
    Location:
    Tennessee
    #6
    You could just use a fixed width for the entire page so that the content does not resize, it just adds scroll bars to the window when it is sized too small.
     
  7. ElectricMan5 thread starter macrumors regular

    Joined:
    Jul 22, 2008

Share This Page