News:

Welcome to SMF Ads Support Forum

Main Menu
Coinbase

Aligning ad blocks

Started by Myself, November 20, 2006, 05:42:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Myself

I have installed the mod, no problems, but I am stuck on how to align the various ad blocks. Example, I want to have the ads at the bottom of the page appear centered, but at the moment they are defaulting to be aligned left.

bigguy

try putting this code around the ad:

<div align=center>ad code</div>

Myself

I did try that before posting here. Didn't work...  :(

bigguy

That should have worked no problems. There is another way to do it but I can't think right now. Let's see what Jerm has to say.

Myself

Apologies - I tried it again and it worked this time. I must have screwed up the code first time out.

jerm

try this instead
<div align="center">ad code</div>

bigguy

Hmm, I never have to use "" at all. I wonder why.

Swoah

If I use the code as above it doesn't seem to work.

This is the code I wan't to align, only the bold, the rest is extra.

//Display ads on the top of the page
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);[/b]


I've changed it like this:

//Display ads on the top of the page
<div align="center">
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
</div>


But when I open the index page it gives this error:
QuoteParse error: parse error, unexpected '<' in .../Themes/safgreen/index.template.php on line 171

162:
163:             document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
164:
165:             current_header_ic = mode;
166:          }
167:       // ]]></script>
168: </head>
169: <body>';
170: //Display ads on the top of the page

171: <div align="center">

172:    $ads = show_topofpageAds();   
173:    if(!empty($ads))
174:       if($ads['type']==0)
175:          echo $ads['content'];

Line 171 seems to be wrong, but I don't know what is wrong. Can U help me?

bigguy

use:

<div align=center>adcode</div>

Around the ad code in the text box in your admin panel. ;)

Swoah

Ok, thanks. It works fine now.

bigguy

No problem, glad it's fixed. ;)