1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is this possible in CSS?

Discussion in 'CSS' started by ian_ok, Mar 19, 2005.

  1. #1
    I have all my link partners listed within a <td> </td> is it possible make all the text a certain colour font size etc and then to also make the LINKS follow a certain patern for hover visited etc.

    At the moment I have it like this:
    <td class="text">

    <a class"link" href...........etc></a> </td>

    So what I want it to have just one class and for it to take effect on both conditions (text and links within the <td>).

    Ian
     
    ian_ok, Mar 19, 2005 IP
  2. Lever

    Lever Deep Thought

    Messages:
    1,823
    Likes Received:
    94
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Did you sort your h1 problem in the end... we don't seem to have closure on that one ;)
     
    Lever, Mar 19, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Define a class for the container element and then use child selectors to modify links' properties. For example:

    table.links-container {...}
    table.links-container td a {...}
    table.links-container td a:hover {...}

    J.D.
     
    J.D., Mar 19, 2005 IP
  4. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just tested it and replied, sorry for the delay in saying thanks Lever.

    Ian
     
    ian_ok, Mar 19, 2005 IP
  5. Lever

    Lever Deep Thought

    Messages:
    1,823
    Likes Received:
    94
    Best Answers:
    0
    Trophy Points:
    145
    #5
    Now worries :) As J.D. rightly points out, I used a .header a:link, a:visted {} style, which obviously means that your normal, unvisited, unclicked links in the header will look the same as your visited links in the header - from an aesthetic POV that's cool, but from a usability POV you may wish to slightly differentiate between the two ;) <edit>Or even obviously differentiate...</edit>
     
    Lever, Mar 19, 2005 IP
  6. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thnaks everyone, as I slowly get use to using css more I understand more!

    As the site is very new I have been able to change a few things, this is what I'm doing:

    <td class="text"></td> Which is for the type of text and size

    .text {
    font-family: Tahoma;
    font-size: 12px;
    }


    And then:
    a:active {font-family: Tahoma; font-size: 12px; color:#006699; TEXT-DECORATION: none }
    a:link {font-family: Tahoma; font-size: 12px; color:#006699; TEXT-DECORATION: none }
    a:visited {font-family: Tahoma; font-size: 12px; color:#006699; TEXT-DECORATION: none }
    a:hover {font-family: Tahoma; font-size: 12px; color:#ff9933; TEXT-DECORATION: none;}

    Thanks.

    Ian
     
    ian_ok, Mar 20, 2005 IP