Center my ads?

Discussion in 'Co-op Advertising Network' started by beer234, Jun 22, 2006.

  1. #1
    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?
     
    beer234, Jun 22, 2006 IP
  2. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #2
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network_xxx.php');
    echo '<br><DIV align=center>';
    echo $ad_network;
    echo '</DIV>';
    ?>
     
    fryman, Jun 22, 2006 IP
  3. collegebarscene

    collegebarscene Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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
     
    collegebarscene, Jun 23, 2006 IP
  4. beer234

    beer234 Active Member

    Messages:
    155
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #4
    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
     
    beer234, Jun 23, 2006 IP
  5. collegebarscene

    collegebarscene Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5


    the code replaces that.
     
    collegebarscene, Jun 23, 2006 IP