English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to remove the underlines from some text links in my webpage but not all of the links. This is the code the stops the underline in all the links:


But does anyone know the code to stop the underline on just the chosen links?

2006-09-10 00:45:32 · 2 answers · asked by peter s 1 in Computers & Internet Programming & Design

2 answers

In the HTML document, you need to create a unique ID for the links you don't want underlined and then reference it in your stylesheet. For example:



My Link



In the CSS, you would then create a stylesheet declaration for all links, and a separate one for links with the unique ID.

a {
text-decoration: underline;
}

a.no_underline {
text-decoration: none;
}

In this example I've used "no_underline" as my unique ID, but you can name yours anything you want. Just make sure the same name is being used in both the HTML and CSS.

2006-09-10 02:04:08 · answer #1 · answered by A* 7 · 0 0

I haven't tried this but can you not put the text-decoration parameter into the individual links?

The other alternative would be to design two styles in your css part - one with and one without underlines.

2006-09-10 07:51:37 · answer #2 · answered by Owlwings 7 · 0 0

fedest.com, questions and answers