SimplePortal
Customization => Themes and Graphics => Topic started by: frantic on August 24, 2010, 09:18:29 PM
-
So i set my site up with adsense but for the life of me i can't get it to center in the block. You can see what happened here http://gadgetank.com/index.php?action=forum. Is their anything i can do to get the code to center.
SMF 2.0 RC3
Simpleportal 2.3.2
-
i am not to sure what your trying to center ???
if your talking about the hole of your site to center in a window, i would suggest you need to look at the theme.
the side frames are rather large and that pushes everything over to the right, the theme has probably been made for a screen resolution larger than 1152 x 864 pixels
the width of your Google adds are larger that the Block you have made...
a few choices;
1. widen the Block
2. narrow the add
3. change the padding found in the \Themes\default\css\portal.css
currently set at
.sp_regular_padding{padding: 5px;}
.sp_content_padding{padding: 0 0.8em;}
div.sp_block{padding: 0 0.5em;}
4. or make your own css for the Google adds
-
Mmm, you need to widen the block a bit, ore reduce the padding.
Centering of ads schould be able to do with:
<div align="center">Google ad code</div>
-
* sp-left is 130px wide
* sp-left has left & right padding of 1px
* the first ad is 120 px wide
* sp_block has left and right padding of .5em (width in pixels dependant on the m-width of the font)
* There are borders, which have width of 1 to 2 px
* There is even some border-spacing here and there.
All in all this seems to mean you need slightly more than 130px for the left blocks.
You should see good results by gradually increasing the left block width until the scroll-bars disappear.
*
-
thanks guys, i appreciate it.
-
Please let us know if that solves your problem.
Thanks
-
it did, thanks again.
-
I've marked this solved, and moved to theme and graphics.