Results 1 to 5 of 5

Thread: Link Hover Code Needed

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default Link Hover Code Needed

    I need link hover code to make the link become underlined with a dashed underline.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    You can do this with CSS: Cascading Style Sheets. This is a type of code which goes in the head of your document, or in a seperate file.

    The markup would look something like this:
    Code:
    <html>
    <head>
    <style type="text/css">
    /*CSS code goes here/*
    </style>
    </head>
    <body>
    </body>
    </html>
    So to do links, you can do this:
    Code:
    a:hover {
    text-decoration:underline;
    }
    "a" stands for anchor, and hover is like an event handler, when you mouseover and mouse out do something, which is defined between to braces {}. That will set a hover affect for all the links on your page.

    BTW: you might want to read a good CSS tutorial.
    - Mike

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by IllustriousLyts
    I need link hover code to make the link become underlined with a dashed underline.
    Only solid underlines are possible. One could use a dashed border, but that doesn't carry the same semantics.

    Mike

  4. #4
    Join Date
    Nov 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot, it was needed for me as well




    have a goood day

  5. #5
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Think this is what you were looking for:

    A:hover {
    font-family: "Tahoma";
    font-size: 8pt;
    color: #9A8975;
    text-decoration: none;
    font-weight: normal;
    border-bottom: #091434;
    border-width: 0px 0px 1px 0px;
    border-style: none none dotted none
    ;
    }

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
  •