Help Please. Simple Qusetion

Discussion in 'CSS' started by nameonthecake, Aug 24, 2006.

  1. #1
    Okay, lets say I want to add a Link Style to this Class. What do I do..

    .class1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333333;
    background-color: #FFFFFF;
    padding: 0px 10px;
     
    nameonthecake, Aug 24, 2006 IP
  2. free

    free Banned

    Messages:
    1,154
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can this interactive CSS Link Tutorial

    or the text tutorial here:

    <html>
    <head>
    <style type="text/css">
    a.one:link {color: #ff0000}
    a.one:visited {color: #0000ff}
    a.one:hover {color: #ff0000}

    a.two:link {color: #ff0000}
    a.two:visited {color: #0000ff}
    a.two:hover {font-size: 150%}

    a.three:link {color: #ff0000}
    a.three:visited {color: #0000ff}
    a.three:hover {background: #00ff00}

    a.four:link {color: #ff0000}
    a.four:visited {color: #0000ff}
    a.four:hover {font-family: monospace}

    a.five:link {color: #ff0000; text-decoration: none}
    a.five:visited {color: #0000ff; text-decoration: none}
    a.five:hover {text-decoration: underline}
    </style>
    </head>

    <body>

    <p>
    <a class="one" href="http://forums.digitalpoint.com/" target="_blank">This link changes color</a>
    </p>
    <p>
    <a class="two" href="http://forums.digitalpoint.com/" target="_blank">This link changes font-size</a>
    </p>
    <p>
    <a class="three" href="http://forums.digitalpoint.com/" target="_blank">This link changes background-color</a>
    </p>
    <p>
    <a class="four" href="http://forums.digitalpoint.com/" target="_blank">This link changes font-family</a>
    </p>
    <p>
    <a class="five" href="http://forums.digitalpoint.com/" target="_blank">This link changes text-decoration</a>
    </p>
    </body>
    </html>

    hope this helps :D
     
    free, Aug 25, 2006 IP
  3. nameonthecake

    nameonthecake Banned

    Messages:
    336
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks it did help, but lets say I want to add a link style to a specefic class that I already have defined. Like, I do not want the class just to be a link style.
     
    nameonthecake, Aug 25, 2006 IP
  4. GLD

    GLD Well-Known Member

    Messages:
    307
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #4
    This should work fine:

    .class A:link {
    color: #E4E4E4;
    font-size: 11px;
     }
    Code (markup):
     
    GLD, Aug 25, 2006 IP