| How do I make links with no underline? |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
The underline underneath links is easily removed using a style sheet. If you are using style sheets, you can specify no underline using this code in your .css file:
a {
text-decoration: none;
}
The links will still be distinguished by color. You may also wish to distinguish them by font. If you do not have a separate style sheet file, you can do this in the <head> portion of your page like so:
<head>
<style type="text/css">
a {
text-decoration: none;
}
</style>
</head>
However it is usually more convenient to create one style sheet file, named stylesheet.css, in the top directory of your web space and use it in each of your pages by adding this element to the <head> section of the page:
<link rel="stylesheet" href="/stylesheet.css" type="text/css">
For a slightly more sophisticated look, consider bringing back the underline only when the mouse pointer is hovering over the link. Try this in your style sheet:
a:hover {
text-decoration: underline;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
For more information about this issue, see the "link with no underline?" discussion on webmasterworld.com.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|