In this case, all hyperlinks within the element have had their underline removed, however, the second hyperlink overrides the rule and adds an underline back in. Here's an example of "overriding" a non-underlined hyperlink with an underline. To add an underline to a link (or any other text for that matter), you simply change the none to underline, like this: text-decoration: underline. For example, you might be working with links that have had their underline removed by a global style sheet, but your page/pages require the links to be underlined. There may be some cases where you need to add an underline to a link instead of removing it. Here's an example of using a class to remove the underline from all hyperlinks within the element that the class is applied to. CSS classes are a normal part (and good practice) of website design. This way you don't need to add the above code to every hyperlink that you need to remove the underline from. Most of the time you will want to place the styes into a class. This tells the browser not to decorate the text (i.e. Specifically, you need to use: text-decoration: none. To remove the underline from a hyperlink, you need to use the CSS text-decoration property. This page explains and demonstrates how to remove the underline from the links on a website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |