49 users online (1 members and 48 guests)  

Thread: Hover problem


  Results 1 to 4 of 4

Related

  1. Replies: 3
  2. can't get a:hover to work in IE6    Forum: CSS Forum
    Replies: 2
  3. Hover command on a td    Forum: CSS Forum
    Replies: 3
  4. Help with an inline a:hover    Forum: CSS Forum
    Replies: 1
  5. Hover text    Forum: Website Scripts Forum
    Replies: 1
  1. #1
    Terrys's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2016
    Posts
    2

    Hover problem

    Hi,
    This is my first post so be gentle with me. My problem is as follows....
    In my site ( not yet online) I have several links. They all work okay, First color in red and hover color blue.
    I also have one other link This is one word in a paragraph of red text. I have changed this word to color white. The link works but I cannot get the word to change to color blue on hover.
    Be sure to read our <a href="news.html"><span style="color:#FFF;">news</span></a> page in the Gallery section.
    Can any one help please?

    Regards

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Hover problem

    Hi there Terrys,

    and a warm welcome to these forums.

    Using inline-styling will often cause problems such as yours.

    It is much better to code it like this...

    Code:
    
    <!DOCTYPE html>
    <html  lang="en">
    <head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <title>untitled document</title>
    
    <style media="screen">
    body{
        background-color:#000;
     }
    a {
        color:#f00
     }
    a:hover,#news:hover { 
        color:#00f;
     } 
    #news {
        color:#fff;
     }
    </style>
    
    </head>
    <body>
    
    <a href="contact.html">contact</a>
    
    <a id="news" href="news.html">news</a>
    
    </body>
    </html>

  3. #3
    Terrys's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2016
    Posts
    2

    Re: Hover problem

    Hi Thank you for your help, have now resolved my problem

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Hover problem


    No problem, you're very welcome.