Centering Coop Ads on htm/html page

Discussion in 'Co-op Advertising Network' started by GuyFromChicago, Jan 4, 2005.

  1. #1
    I set up an add on an .htm page using the instructions in this thread.

    The coop ad displays on the left of the page & I'd like to center it.

    A little help?
     
    GuyFromChicago, Jan 4, 2005 IP
  2. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #2
    text-align: center;

    No???
     
    SEbasic, Jan 4, 2005 IP
  3. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #3
    <center> Coop Code </center>

    works for me
     
    joeychgo, Jan 4, 2005 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <div align="center">ads here</div> works too.
     
    T0PS3O, Jan 4, 2005 IP
    GuyFromChicago likes this.
  5. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This is what I use to not only center 5 ads but include space between:

    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo '<center>'.$ad_network[0].'&nbsp;&nbsp;&nbsp;&nbsp'.$ad_network[1].'&nbsp;&nbsp;&nbsp;&nbsp'.$ad_network[2].'&nbsp;&nbsp;&nbsp;&nbsp'.$ad_network[3].'&nbsp;&nbsp;&nbsp;&nbsp'.$ad_network[4].'</center>';
    ?>
    Code (markup):
    Cheers
     
    yfs1, Jan 4, 2005 IP
    GuyFromChicago likes this.
  6. GuyFromChicago

    GuyFromChicago Permanent Peon

    Messages:
    6,728
    Likes Received:
    529
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks guys, I gave some positive rep to those that I could :)
     
    GuyFromChicago, Jan 4, 2005 IP
  7. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Glad I could help Guy :)
     
    yfs1, Jan 5, 2005 IP
  8. GuyFromChicago

    GuyFromChicago Permanent Peon

    Messages:
    6,728
    Likes Received:
    529
    Best Answers:
    0
    Trophy Points:
    0
    #8
    My brain's a little slow today...everytime I've tried centering the single ad by modifying the passthru.php I end up with an error message.

    Could some kind soul post the exact code they would use to accomplish this and help a GuyFromChicago out?

    (I'm good at following instructions and that's about it :) )
     
    GuyFromChicago, Jan 12, 2005 IP
  9. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Add <center> before the php passthru.php code and </center> after
     
    l234244, Jan 12, 2005 IP
  10. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #10
    passthru.php

    <?php

    if (!function_exists('file_get_contents')) {
    function file_get_contents($url) {
    $handle = fopen($url, 'r');
    $string = fread($handle, 4096000);
    fclose($handle);
    return $string;
    }
    }

    include ('ad_network.php');
    echo preg_replace ("/<\/body>/i", '<center>' . $ad_network[0]. ' - ' . $ad_network[1]. ' - ' . $ad_network[2] . ' - ' . $ad_network[3] . ' - ' . $ad_network[4] . '</center></body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));
    ?>
     
    ResaleBroker, Jan 12, 2005 IP
  11. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I meant this way but still does the same job :)

    <center><?php

    if (!function_exists('file_get_contents')) {
    function file_get_contents($url) {
    $handle = fopen($url, 'r');
    $string = fread($handle, 4096000);
    fclose($handle);
    return $string;
    }
    }

    include ('ad_network.php');
    echo preg_replace ("/<\/body>/i", '' . $ad_network[0]. ' - ' . $ad_network[1]. ' - ' . $ad_network[2] . ' - ' . $ad_network[3] . ' - ' . $ad_network[4] . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));
    ?>
    </center>
     
    l234244, Jan 12, 2005 IP
    GuyFromChicago likes this.