5 replies [Last post]
kencss
Offline
newbie
Last seen: 15 years 48 weeks ago
Joined: 2004-08-09
Posts: 3
Points: 0

How do you stop an underline appearing below a hyperlink?, the reason is I want the underline to appear when you hover over it,.

I'm using Frontpage 2003 and whenever I create a hyperlink it is always formed with an underline.

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 15 years 49 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

How to stop the underline

a {
 text-decoration:none;
}

Though it is customary for links to be underlined - it's what people look for.

Using FrontPage, sorry to hear that.

kencss
Offline
newbie
Last seen: 15 years 48 weeks ago
Joined: 2004-08-09
Posts: 3
Points: 0

thanks

Thanks, I knew it must must have been something simple, I just like the effect in some places.

If I had a dollar for everytime someone told me not to use frontpage!, just mentioning frontpage on any web design related forum is guaranteed a response.

obsidian
Offline
Enthusiast
South Carolina
Last seen: 13 years 38 weeks ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

How to stop the underline

What's so cool about using the text-decoration for your <a> tags is that you can pick and choose where or when to underline. You can have your links plain, and then the hover state can be underlined... try something like this for a different effect:

a:link, a:visited {
text-decoration: none;
color: #003399;
}

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

I'm pretty new to this myself, but there are all kinds of cool effects you can come up with!

You can't win, you can't lose, you can't break even. You can't even get out of the game!

justers
Offline
newbie
England
Last seen: 15 years 50 weeks ago
England
Joined: 2004-07-22
Posts: 8
Points: 0

How to stop the underline

you can also use the border function to create nice underlines:

text-decoration:none;
border-bottom:1px dashed #000;

this would give you a black dashed underline. you can mess about with different pixel sizes, border types and colours using this method.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 16 weeks 17 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

How to stop the underline

You can also use dotted for another effect.

Verschwindende wrote:
  • CSS doesn't make pies