New Vauxhall Cars - Problem Mortgage - Credit Counseling - Mortgages - Loans

PDA

View Full Version : Center my ads?


beer234
Jun 22nd 2006, 3:54 pm
I managed to get the ads runninng on my forum at sandalspictures.com but if you scroll down you'll see they are shifted to the left. I do not really know PHP well. Could someone tell me how I might get the ads centered under my forum so it looks better?

fryman
Jun 22nd 2006, 3:56 pm
<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include ('ad_network_xxx.php');
echo '<br><DIV align=center>';
echo $ad_network;
echo '</DIV>';
?>

collegebarscene
Jun 23rd 2006, 8:06 am
<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include ('ad_network_xxx.php');
echo '<br><DIV align=center>';
echo $ad_network;
echo '</DIV>';
?>

Actually, the XHTML valid version would look like this:

<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include ('ad_network_xxx.php');
echo '<br /><div style="text-align:center; width:800px;">';
echo $ad_network;
echo '</div>';
?>

but instead of 800px, you set it to however wide your forum is. it will float the text in the center. using align="center" is not valid HTML and will not work in some browsers.

Just FYI :p

beer234
Jun 23rd 2006, 8:58 am
Two more noob questions.

Do I place this code in my templates where previous I just put $ad_network included in the install instructions. Does this code replace that or work with it?



Thanks again
John

collegebarscene
Jun 23rd 2006, 11:30 am
Two more noob questions.

Do I place this code in my templates where previous I just put $ad_network included in the install instructions. Does this code replace that or work with it?



Thanks again
John



the code replaces that.