CSS same URL links on web pages

Discussion in 'CSS' started by gvm, Sep 13, 2006.

  1. #1
    Hi,

    I'm trying to get a list of url links to show on each of my web pages.
    In my .css page I have created this: div.leftcolboxlink {
    <a href="www.google.com">Google</a>;
    }

    On the respective css web page I reference the .css page with this line:
    <div class="leftcolboxlink"></div>

    I have no link showing on the design of my page.
    Any ideas?:)

    Thanks,
    Greg
     
    gvm, Sep 13, 2006 IP
  2. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #2
    You can't do that with CSS. You can try with Javascript.
     
    SoKickIt, Sep 13, 2006 IP
  3. gvm

    gvm Guest

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This doesn't make sense to me. Is it because the CSS syntax will not express it, or something else. I understand that the anchor tag I used in html might not work. I can write the .css expression to cascade pictures and text to various web pages, but not hypertext links...I don't get it.

    Thanks for your info...:)
     
    gvm, Sep 14, 2006 IP
  4. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #4
    CSS is used to describe how HTML elements should be formatted (color, size...). You're trying to add elements with CSS. You can't do that.
     
    SoKickIt, Sep 14, 2006 IP
  5. gvm

    gvm Guest

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks again for responding. I see what you mean.
    On further investigation I found that SSI and PHP will allow me to do what I want with CSS.

    :)
     
    gvm, Sep 14, 2006 IP
  6. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #6

    PHP:

    links.php:

    <a href="">....</a><br />
    <a href="">....</a><br />
    <a href="">....</a><br />
    <a href="">....</a><br />


    In all other pages:

    <?php include "links.php"; ?>
     
    SoKickIt, Sep 14, 2006 IP