1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I add a Hover underline to this code

Discussion in 'CSS' started by donald, May 5, 2008.

  1. #1
    Hi there, I would like to add a hover underline to the code below.

    <a href="http://www.site.com" style="text-decoration:none; font-weight:bold;color:#0063DC; font-size:13px">Home</a>
    HTML:
    I have to add it to this code not to the CSS sheet

    thanks for your help :)
     
    donald, May 5, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    To my knowledge, you can't. I'm guessing that's for html email. It would be more user friendly to not remove it in the first place.

    cheers,

    gary
     
    kk5st, May 5, 2008 IP
  3. Astroman

    Astroman Well-Known Member

    Messages:
    2,355
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    135
    #3
    You can't really do it like that with an in-line style command, you have to make a style sheet or some style rules at the top of the page and give your anchor a class or id.
     
    Astroman, May 5, 2008 IP
  4. angeleyes20

    angeleyes20 Banned

    Messages:
    296
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    check out w3schools.com they have a lot of different HTML codes.

    :D
     
    angeleyes20, May 5, 2008 IP
  5. donald

    donald Active Member

    Messages:
    668
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #5
    ok thanks for your respond. I'll try to add it to the style sheet.
     
    donald, May 5, 2008 IP
  6. tony84

    tony84 Well-Known Member

    Messages:
    1,864
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    140
    #6
    is it not text-decoration=underline?
     
    tony84, May 5, 2008 IP
  7. mytvtalk

    mytvtalk Active Member

    Messages:
    933
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #7
    you would have to create a css style sheet when that is done you would need to make a div in the html say for example
    <div id="nav">
    <a href="http://www.site.com" title="site">Home</a>
    </div>

    then in the css stlyes make this

    #nav a{
    text-decoration:underline;
    font-weight:bold;
    color:#0063DC;
    font-size:13px;
    }

    thats what i would do, i hope this helps you
     
    mytvtalk, May 5, 2008 IP
  8. mytvtalk

    mytvtalk Active Member

    Messages:
    933
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #8
    sorry i think the code should have been

    #nav a:hover{
    text-decoration:underline;
    font-weight:bold;
    color:#0063DC;
    font-size:13px;
    }
     
    mytvtalk, May 5, 2008 IP
  9. donald

    donald Active Member

    Messages:
    668
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #9

    thanks for your help. Since I already have a style sheet I just removed the "text-decoration:none" from the code and it's working fine.



    yes but I want to do A Hover style.

    just like here http://www.echoecho.com/csslinks.htm

    look under "The link from the above example would look like this:

    LOOK HERE
    "
     
    donald, May 5, 2008 IP
  10. mytvtalk

    mytvtalk Active Member

    Messages:
    933
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #10
    glad u have worked it out!
     
    mytvtalk, May 5, 2008 IP