www.webdeveloper.com
Results 1 to 4 of 4

Thread: CSS Query

  1. #1
    Join Date
    Dec 2006
    Posts
    41

    CSS Query

    I have a website that i am nearly finished working on, I am now testing the page and have found a problem.

    I am using the lines:

    a:hover {
    text-decoration: underline;
    }


    in my css to underline link text when the mouse pointer hovers over the top of it. When testing it i found that this works perfect in IE6 and 7 but it doesnt work in firefox? is there a reason for this or can i adapt my code in any way to make this work?

    Thanks

  2. #2
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    By default, links are underlined, so there normally wouldn't be a CSS to do this, other than to change the text color. Additionally, you need all states of the link:

    Code:
    a:link{
    
    }
    a:visited{
    
    }
    a:hover{
    
    }
    a:active{
    
    }
    However, we'd need to see the code to the entire page to make sure nothing else is causing it to go awry.

  3. #3
    Join Date
    Dec 2006
    Posts
    41
    p {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    }

    pre

    {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:11px;

    }

    h1 a:link {
    text-decoration: none;
    color: #006699;
    }

    h1 a:visited {
    text-decoration: none;
    color: #006699;
    }

    h1 a:hover {
    text-decoration: underline;
    color: #006699;
    }

    Textleft
    {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:10px;
    color:#00FF33
    }

    Thats a snippet of my CSS with the code for underlining the links ONLY when the mouse pointer is hovering over the top of it.

    Do you need any more code?

  4. #4
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles