SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Link Question

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link Question

    In my page i have a table that basicly outlines the layout of the page. In each table cell there is different content.

    Now using CSS i would like to outline how all global links will look like, but also outline how links in each table cell will look like.

    So this way i can give different styles for links in different table cells.

    Would anyone know how i can do this.

    Thx

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Use inheritance:
    Code:
    /*redefine all links on page*/
    a {
      color: green;
    }
     
    /*now only links which are inside table cells */
    td a {
      color: red;
    }

  3. #3
    SitePoint Enthusiast DFS's Avatar
    Join Date
    Sep 2002
    Location
    The Wilds of Northern Maine
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zoltron
    Now using CSS i would like to outline how all global links will look like, but also outline how links in each table cell will look like.
    To further add to Mr. Garcia's most sage advice... You can then get more specific by adding ID's or classes to the containing blocks. Links to external sites for example.. you would add a class to the element surrounding those links (probably should be a div or a list of some sort) but I assume it works with tables, you could set the td that contains your external links to <td class="external"> then take the CSS already spelled out above and add
    Code:
     
    td.external a { 
    color: blue;
    } 
    Now you've got three different link schemes going.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •