Reproduced Css<a href> Link Style conflict resolution Method!

Source: Internet
Author: User

Give yourself this beginner's look!

Original address:css<a href> Link Style conflict resolution Method! Ye lang

Here I briefly say: about a href style conflict

First I have an external CSS style file (INDEX.CSS) directly written with A:link A:active directly

and the site home page and other columns are called <link href= "css/index.css" rel= "stylesheet" type= "Text/css"/> but I want to add a new link to the homepage and write a new style, But the new style does not work, because the home page also calls <link href= "Css/index.css" rel= "stylesheet" type= "Text/css"/>, because previously only considered convenient, did not consider the subsequent priority issues.

This will give my entire site a href style given dead. Not convenient later more busy CSS style!

Here's how to fix it:

If you're writing for the first time

a:link {font-family:verdana, Arial, Helvetica, Sans-serif;  Color: #333333;  Text-decoration:none; font-size:12px;}

a:visited {font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:none;  Color: #333333;  font-size:12px; Font-weight:normal; }

a:hover {font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:none;  Color: #06C;  font-size:12px; Font-weight:normal;}

a:active {font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:none;  Color: #333333;    font-size:12px; Font-weight:normal; }

So you want to be busier a place of <a href> style. Write it like this:

This is the website file <a href= "index.asp" class= "A3" >

and add it to the CSS.

A.a3:link {font-family:verdana, Arial, Helvetica, Sans-serif;  Color: #000000;  Text-decoration:none;  font-size:12px;  line-height:18px; Font-weight:normal; }

a.a3:visited {font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:none;   Color: #000000 font-size:12px; }

A.a3:hover {font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:underline;  Font-weight:normal;  Color: #009966;   font-size:12px;  } a.a3:active {Font-family:verdana, Arial, Helvetica, Sans-serif;  Text-decoration:none;  Color: #FF0000;  font-size:12px; Font-weight:normal; }

Reproduced Css<a href> Link Style conflict resolution Method!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.