CSS class?

Discussion in 'Web Design & Coding' started by Nismo83, Oct 21, 2002.

  1. Nismo83

    Nismo83 OSNN AZN Addict

    Messages:
    383
    Is there any way to specify a class for those hyperlink other than:

    Code:
    a:link {
     font-family: verdana, arial, "ms sans serif", sans-serif; 
     color: #000000;
     font-weight: normal; 
     text-decoration: none;
     text-align:center;
    
     }
    a:visited {
     font-family: verdana, arial, "ms sans serif", sans-serif; 
     color: #000000;
     font-weight: normal; 
     text-decoration: none;
     text-align:center;
    
     }
    a:active {
     font-family: verdana, arial, "ms sans serif", sans-serif; 
     color:#000000;
     font-weight: normal; 
     text-decoration: none;
     text-align:center;
    
     }
    a:hover {
     font-family: verdana, arial, "ms sans serif", sans-serif; 
     color:#000000;
     font-weight: normal; 
     text-decoration: underline;
     text-align:center;
    
    This is because i'm have a lot of links in my web page and need to have different values(colors and text decoration) on each category of link.

    I am currently { [​IMG] | | [​IMG] | | [​IMG] }
    =========================
    Intel P4 1.5 Ghz
    Intel D850GB MOBO
    256MB PC 800 RDRAM
    20GB Maxtor HDD (5400 RPM)
    40GB Maxtor HDD (7200 RPM)
    52X Creative CDROM
    8X4X32 Creative CDRW
    16X ASUS DVD ROM
    Iomega 100 MB USB Zip Drive
    SYBA Ultra ATA IDE controller card
    SB live 5.1 DE
    Ageing Gainward 64MB GF2MX400 --> | Upgrading to GF4 Ti4 series |
    Altec Lansing ACS 56
    Dlink D538TX NIC

    =========================
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Sure. Those there aren't even classes, they are selectors.

    a.linktype1{[...]} is a new class. Usage: <A CLASS="linktype1" [...]>[...]</A>
    You can even have a.linktype1:hover{[...]} if you want to.
     
  3. Nismo83

    Nismo83 OSNN AZN Addict

    Messages:
    383
    ty :)

    I am currently { [​IMG] | | [​IMG] | | [​IMG] }
    =========================
    Intel P4 1.5 Ghz
    Intel D850GB MOBO
    256MB PC 800 RDRAM
    20GB Maxtor HDD (5400 RPM)
    40GB Maxtor HDD (7200 RPM)
    52X Creative CDROM
    8X4X32 Creative CDRW
    16X ASUS DVD ROM
    Iomega 100 MB USB Zip Drive
    SYBA Ultra ATA IDE controller card
    SB live 5.1 DE
    Ageing Gainward 64MB GF2MX400 --> | Upgrading to GF4 Ti4 series |
    Altec Lansing ACS 56
    Dlink D538TX NIC

    =========================