SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast BerlinIT's Avatar
    Join Date
    May 2003
    Location
    Melbourne, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make Various Different style Links on the same html page

    This has had me stumped for a while now... basically what i want is the following:-

    Links inside text paragraphs must have a yellow link that underlines when hovered over. This is easy to do in css, by editing the a:link, a:hover properties.

    Also, I want some header links which are bigger, and must be white and glow orange when hovered over. How can i create this alternative anchor class?

    Can I then create a third anchor class for yet a different set of links?

    Hoping its an easy solution that somebody can help me with .

    Cheers,
    Greg
    Berlin IT Services
    - Website Design & Development
    - Content Management Systems

    Located: Melbourne, Australia

  2. #2
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    a:link {
    //properties
    }
    a:visited {
    //properties
    }
    
    ect
    
    ect
    
    a.newstyle {
    //properties
    }
    .newstyle:visited {
    //properties
    }
    
    ect
    
    ect
    Normal links will work as expected, use <a class="newstyle"> for your alternative link styles. Define, for example, newstyle2 and newstyle3 etc for multiple link styles.

    Dan

  3. #3
    SitePoint Enthusiast BerlinIT's Avatar
    Join Date
    May 2003
    Location
    Melbourne, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool... thanks Dan. I'll try that tomorrow.

    For some reason I dont think that worked last time i tried it, although it is the logical solution... i'll definitely give it another try though.

    Cheers,
    Greg
    Berlin IT Services
    - Website Design & Development
    - Content Management Systems

    Located: Melbourne, Australia

  4. #4
    SitePoint Addict
    Join Date
    Dec 2002
    Posts
    386
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or possibly you could use descendant selectors...
    p a {
    color:#f00;
    }
    would make all the a tags inside p tags red

  5. #5
    SitePoint Enthusiast BerlinIT's Avatar
    Join Date
    May 2003
    Location
    Melbourne, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahhh thats excellent pissant. thanks for that.

    hope it all works.. will be testing it out this weekend.
    Berlin IT Services
    - Website Design & Development
    - Content Management Systems

    Located: Melbourne, Australia


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
  •