dcsimg
www.webdeveloper.com
Results 1 to 9 of 9

Thread: removing line from links

  1. #1
    Join Date
    Feb 2003
    Posts
    24

    Unhappy removing line from links

    ughhhhh!!
    The blonde is going crazy!!
    I can't remember the code to remove the underline from a link.

    Can any of yoooous? Please and thank yooous!!

    (hey!! I'm a poet and I didn't know it!!)

    JO

  2. #2
    Join Date
    Jan 2003
    Location
    USA
    Posts
    687
    Place this in the head of the document. (this will remove all link underlines)

    <head>

    <style type="text/css">
    <!--

    a {text-decoration:none}

    -->
    </style>

    </head>




    This is an inline method. (will affect only the said link)

    <body>

    <a href="my_url" style="text-decoration: none">my link</a>

    </body>

  3. #3
    Join Date
    Feb 2003
    Posts
    24
    ahhhh HAAA!!! - Right....
    Text decoration!!! (wack to the head!!)

    I knew I knew it.

    Thanks Cyco


  4. #4
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    jo (blonde to the bone) -

    for those times when you want to have a little more control over the
    appearance of your links (instead of default decoration or no decoration):

    a:link {
    color:#0000ff; text-decoration: none;
    }
    a:visited {
    color:#cc0000; text-decoration: none;
    }
    a:hover {
    color:#663366; text-decoration: underline;
    }
    a:active {
    color:#009900; text-decoration: underline;
    }

    mix and match. whatever. you can do a lot of other formatting as well
    (bold, size, etc) but I am only showing link color and underline on or off here.

    ... just in case you might need it.
    k

    (edited to indicate the proper order)
    Last edited by khaki; 02-13-2003 at 01:46 PM.

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Except that the order should be link, visited, hover, active.
    Note that the A:hover must be placed after the A:link and A:visited rules, since otherwise the cascading rules will hide the 'color' property of the A:hover rule. Similarly, because A:active is placed after A:hover, the active color ... will apply when the user both activates and hovers over the A element.
    See http://www.w3.org/TR/REC-CSS2/select...pseudo-classes.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  6. #6
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    nice catch charles.

    i probably had it in the right order way-back-when (sometime after diapers) and i've been cutting and copying and pasting from my self-created style template ever since.

    however, i didn't know that there was supposed to be an exact order, so i guess i better go clean up my mess.

    i appreciate the link. good info (as always).

    sometimes out of order (lol)
    k

  7. #7
    Join Date
    Feb 2003
    Posts
    24
    Hey thanks guys, you are all so brillant!!!

    Khaki, is that really your eye?



    Charles, I never fail to be amazed at how much proper protocol, order and what not there is to all this coding. I am the ultimate novice.

    I'm almost finished my home page... just can't wait to get it up so I can ask you guys to disect it from stem to stern!!!

    Eeeekkkkkk.... no doubt I'll give you all night mares!!!

    JO

  8. #8
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    i fixed the order in my previous post - just in case anybody comes by, spots it, and nabs it before reading charle's response.
    i don't want to be responsible for anyone having to do what i am now doing - flipping through pages looking for "the mixup".

    looking forward to jo's home page (hey jo, can i get a sneak peek?).

    ... and yes. that's my eye (but i'll probably put something different up for valentine's day).

    currently accepting valentines...
    k

  9. #9
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by khaki
    i probably had it in the right order way-back-when (sometime after diapers) and i've been cutting and copying and pasting from my self-created style template ever since.
    Don't beat your self up on thatone. Incorrect orders on links is one of the most widespread errors in wannabe CSS guides, the most prominent of which is W3Cschools...

    Just goes to show, never trust information not directly from the Spec, because all humans makes mistakes, but at least the specs have been read & reread and turned upside down and reda again by the most knowledgeble persons in the area and thus is likely to not have many errors (remember to check the spec erratas though )

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