AdSense messing up my layout

Discussion in 'AdSense' started by mads, Sep 26, 2008.

  1. #1
    My sidebar has plenty of room for a large AdSense rectangle (sidebar width 370, AdSense width 336), but somehow the ad messes up the left part of the content area in my layout.

    Have anyone experienced something similar when they add AdSense to their layout? How did you fix it?

    Thanks, Mads
     
    mads, Sep 26, 2008 IP
  2. keyaa

    keyaa Peon

    Messages:
    137
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I haven't experienced this, but this easy fix should help.

    Try putting a div around it like this:

    <div class="googlead_largeRectangle">
      ..put your adsense code here..
    </div>
    HTML:
    Then style it like this:

    
    .googlead_largeRectangle {
      width:336px;
      height:280px;
      overflow:hidden;
    }
    
    Code (markup):
    Please post back if this works as expected, if it doesn't break your layout but the ad inside the new div, then something with your CSS probably interferes with the AdSense style (got any generic tags/classes styled with !important? might be it) and I'll take a look at it if I may.
     
    keyaa, Oct 1, 2008 IP
    mads likes this.
  3. nicholas777

    nicholas777 Peon

    Messages:
    342
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I had the same problem with the left sidebar... I've placed the ads on the right sidebar.
     
    nicholas777, Oct 1, 2008 IP
  4. mads

    mads Well-Known Member

    Messages:
    762
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Oh, thanks, but I already found out I could solve the problem by decreasing the width of my content area - apparently the error occurred because the total width was to big when I added adsense to the sidebar (don't ask why).
     
    mads, Oct 2, 2008 IP