php coding and link color

Discussion in 'Co-op Advertising Network' started by kyle422, Dec 14, 2004.

  1. #1
    I'm trying to get the ad coop links to match the color themes on my page. I am using this php code right now, which I thought would change the link color through my CSS. Does anyone know how to alter this to get "the carpet to match the drapes"? this is my url www.myfloridahomesforsale.com
    Here is the code.
    <?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", '<div align="center" class="style26">' . $ad_network[0]. ' - ' . $ad_network[1]. ' - ' . $ad_network[2] . ' - ' . $ad_network[3] . ' - ' . $ad_network[4] . '</div></center></body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));
    ?>
     
    kyle422, Dec 14, 2004 IP
  2. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #2
    I've found that divs act funny when you include the align statement. Try using two divs:

    <DIV align="center"><DIV class="style26">
     
    Patient, Dec 14, 2004 IP
  3. kyle422

    kyle422 Peon

    Messages:
    290
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Nope, still coming up the default blue. DOH :eek:
     
    kyle422, Dec 14, 2004 IP
  4. Foxy

    Foxy Chief Natural Foodie

    Messages:
    1,614
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I use a footer and include inside a table and td with a class - works fine :)
     
    Foxy, Dec 14, 2004 IP
  5. kyle422

    kyle422 Peon

    Messages:
    290
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I am a noob with webdesign/php. Could you explain that too me in noob terms.
    ;)
     
    kyle422, Dec 14, 2004 IP
  6. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Your CSS would need the following addition:

     
    .style26 [color=red]a[/color] {font-size: x-small; color: #EBEBEB; font-family: Geneva, Arial, Helvetica, sans-serif; }
    Code (markup):
    or you could set the default colour on your anchors in the CSS as all other anchors appear to be styled by class anyway. BTW you are missing a closing </div> in your ad block.

    Mick
     
    Arnica, Dec 14, 2004 IP
  7. kyle422

    kyle422 Peon

    Messages:
    290
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thank you Mick. That works like a charm. :D
     
    kyle422, Dec 14, 2004 IP