2012-04-25 15 views
8

यह मेरा एनएवी में लिंक में से एक है:नीले और बैंगनी डिफ़ॉल्ट लिंक, कैसे निकालें?

<li><a href="#live-now" class="navBtn"><span id="navLiveNow" class="white innerShadow textShadow">Live Now</span></a></li> 

मैं अपने सीएसएस में निम्नलिखित है:

a { text-decoration: none; } 
a:visited { text-decoration: none; } 
a:hover { text-decoration: none; } 
a:focus { text-decoration: none; } 
a:hover, a:active { text-decoration: none; } 

लेकिन लिंक अब भी में प्रदर्शित भयंकर नीले/बैंगनी दौरा/मंडराना एचटीएमएल चूक। मैं क्या गलत कर रहा हूं?

a { color:red } /* Globally */ 

/* Each state */ 

a:visited { text-decoration: none; color:red; } 
a:hover { text-decoration: none; color:blue; } 
a:focus { text-decoration: none; color:yellow; } 
a:hover, a:active { text-decoration: none; color:black } 

उत्तर

16

आप रंग ओवरराइड करने के लिए की जरूरत है आप रंगों को परिभाषित करने के बजाय रंगों की अपनी पसंद में एंकर प्रदर्शित करना चाहते हैं सीएसएस में एंकर टैग संपत्ति इस तरह: -

a { text-decoration: none; color:red; } 
a:visited { text-decoration: none; } 
a:hover { text-decoration: none; } 
a:focus { text-decoration: none; } 
a:hover, a:active { text-decoration: none; } 

डेमो देखें: - http://jsfiddle.net/zSWbD/7/

0

अरे के रूप में आप की तरह में रंग #000 को परिभाषित करने और इस

.navBtn { text-decoration: none; color:#000; } 
.navBtn:visited { text-decoration: none; color:#000; } 
.navBtn:hover { text-decoration: none; color:#000; } 
.navBtn:focus { text-decoration: none; color:#000; } 
.navBtn:hover, .navBtn:active { text-decoration: none; color:#000; } 

की तरह के रूप में अपने सीएसएस संशोधित करने या इस

li a { text-decoration: none; color:#000; } 
li a:visited { text-decoration: none; color:#000; } 
li a:hover { text-decoration: none; color:#000; } 
li a:focus { text-decoration: none; color:#000; } 
li a:hover, .navBtn:active { text-decoration: none; color:#000; } 
1

निकालें डिफ़ॉल्ट लिंक हल कि: का दौरा बात सीएसएस है .... तुम सिर्फ करने के लिए जाने के लिए अपने HTML और एक सरल

< एक href जोड़ने = "" style = "text-decoration: none"> </a>

... thats

हुआ करता था जिस तरह से HTML पृष्ठों
संबंधित मुद्दे