tags:

views:

36

answers:

3

Help me tweak the CSS of this page:

http://draw3cards.com/questions/1501/buyback-vs-flashback

I tried to understand why the Adsense Ad appears misaligned - I would like it in line with the surrounding box. I looked at it with Firebug but missed any margin or padding in that element.

Can you help?

A: 

The width of surrounding dotted box is about 727px where as that of ad is almost the same, you need to increase the width of the dotted box and if possible little bit of height too.

Sarfraz
+1  A: 

Looks like it's just the padding set on your .porthole class. You have it set to 0.5ems on all sides and this is pushing the ad outside of the dashed box. Try adding top and bottom padding only and/or margin to the <h3> tag within .porthole to get the spacing you need.

Derek Cronk
I say just to add padding to top and bottom because you don't have much horizontal space to work with since you are trying to preserve some space between your mainbar and sidebar... the other option is to increase the width of #question to equal the width of mainbar and give yourself a few pixels of horizontal padding.... or increase the width of container, etc.
Derek Cronk
A: 

Its the "width: 726px" styles on the divs in the adsense iframe pushing it ouf.

E.g:

div id="ads"..

#ads {
left:1px;
position:absolute;
top:1px;
width:726px;
}

Whereas the computed width of div id="banner-top" is only 715.2px.

Explicitly set the width of the surrounding div to match the adsense div. Should do the trick?

RPM1984