40 users online (0 members and 40 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 4
  2. Identical links on same page    Forum: Search Engine Optimization - SEO - Forum
    Replies: 3
  3. List Of Links In The Page    Forum: Javascript Forum
    Replies: 3
  4. Different Colored Links On One Page?    Forum: HTML Forum
    Replies: 3
  5. Links to same page not working on Macs    Forum: HTML Forum
    Replies: 2
  1. #1
    Brownies's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    2

    Different Colored Links On One Page?

    Is there a way to have different colors link, vlink, alink within a table? For example if I two columns can I have white links on a blue background in one column and blue links on a white background in the other? I'm aware of how to change the background color within a table, just not the link color.

    Thanks
    Brownies

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there Brownies,

    Here is an example for you...
    Code:
    <html>
    <head>
    <style type="text/css">
    table{border:solid 1px #000000;}
    td#one{width:100px;height:100px;background-color:#0000ff;border:solid 1px #000000;}
    td#two{width:100px;height:100px;background-color:#ffffff;border:solid 1px #000000;}
    a.white:link{font-family:arial;font-size:20px;color:#ffffff;text-decoration:none;}
    a.white:visited{font-family:arial;font-size:20px;color:#ffffff;text-decoration:none;}
    a.white:hover{color:#ffffff;text-decoration:underline;}
    a.white:active{color:#ffffff;}
    a.blue:link{font-family:arial;font-size:20px;color:#0000ff;text-decoration:none;}
    a.blue:visited{font-family:arial;font-size:20px;color:#0000ff;text-decoration:none;}
    a.blue:hover{color:#f0000ff;text-decoration:underline;}
    a.blue:active{color:#0000ff;}
    </style>
    </head>
    <body>
    <table><tr>
    <td id="one"><a class="white" href="this html">white link</a></td>
    <td id="two"><a class="blue" href="that html">blue link</a></td>
    </tr><table>
    </body>
    </html>
    For further instruction in 'css' try these two links...

    css.somepeople
    http://www.w3schools.com/css/default.asp


    cthead

  3. #3
    Brownies's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    2
    Hey Coothead!

    Thanks for the script. I'm wondering- I already have an html page with tables, all kind of js on it already. Can I add this to the existing page without it being a problem? Also can I add cellpadding and spacing?

    I know I need to learn css, but I'm more than a bit overwhelmed. I actually work better looking at lines and lines of script and pulling it apart than reading a tutorial about how it functions. Like ripping apart an engine to learn it's process vs reading how to repair an engine. Probably a bad example since I can't repair my engine either. But you get the idea.

    Brownies

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Hi brownies,

    If you post your table code somebody should be able to add the css to it pretty easily. This, when looking at both versions, should help you to learn exactly how it works and enable you to do it in other tables.

    Dave



Tags for this Thread