SimplePortal

Customization => Themes and Graphics => Topic started by: frantic on August 24, 2010, 09:18:29 PM

Title: How do you center google ads in Simpleportal blocks?
Post 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

Title: Re: How do you center google ads in Simpleportal blocks?
Post by: deansmar on August 25, 2010, 04:31:11 AM
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
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: Rickardm on August 25, 2010, 04:35:35 AM
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>
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: AngelinaBelle on August 25, 2010, 09:42:22 AM
* 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.
 
 
*
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: frantic on August 25, 2010, 12:05:17 PM
thanks guys, i appreciate it.
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: AngelinaBelle on August 25, 2010, 04:32:30 PM
Please let us know if that solves your problem.
Thanks
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: frantic on August 26, 2010, 12:30:38 PM
it did, thanks again.
Title: Re: How do you center google ads in Simpleportal blocks?
Post by: AngelinaBelle on August 26, 2010, 12:35:07 PM
I've marked this solved, and moved to theme and graphics.
SimplePortal 2.3.8 © 2008-2024, SimplePortal