Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: CSS and Links

  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and Links

    Greetings,

    I have a problem with links.

    I have a coloured bar on the top of my page. Below the bar is a white background. I need two sets of links colours, with hover effect and no underline, so that they'll show up okay in each section. How can I make two sets like this?

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey...there's an easy solution for this.

    for the links in your navigation bar
    - assign the <div> or <td> (or whatever) that all your links are contained in an id, such as "navbar"
    - add this CSS:

    #navbar a { color: blue; text-decoration: none}

    etc...

    This tells all links inside the container "navbar" to behave a certain way. The other links in your page will not be affected, so style them the same way you did before
    Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
    The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
    Pretty buttons does not a great website make.

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks--that works okay--but how do I add a hover effect?

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Use the :hover psuedo-class. "What's that?" you say?

    http://www.w3schools.com/css/css_pseudo_classes.asp

    Hope it helps...

  • #5
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Right, I've put that in, but nothing happens. Here's what I have:

    .navbar a:link { color:e8e8e8; text-decoration: none}
    a:visited {color: #00FF00}
    a:hover {color: #FF00FF}
    a:active {color: #0000FF}
    Last edited by seanohio; 01-21-2005 at 04:14 AM.

  • #6
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    .navbar has to be before everything

    Thanks!!


  •  

    Posting Permissions

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