2015-10-13 20 views
0

我想將「閱讀BIC雜誌數字版」鏈接改爲紅色(請看附圖)。CSS幫助,如何將此鏈接定位在div

screen shot of link

我只能訪問的CSS,這是什麼樣子。

.logo .header_links{ 
margin-top:30px; 
position:absolute; 
right:0px; 
bottom:33px;} 

.header_links a{ 
display:inline-block; 
font-family: 'verdana', 'arial', sans-serif; 
color: #0060AF; 
font-size: 13px; 
text-decoration:underline; 
padding:0 10px; 
border-left: 1px solid #666; 
margin:0px -4px 0px 0px;} 

.header_links a;"Read BIC Magazine Digital Edition"{ 
color: red;} 

.header_links a:first-child{ 
    border-left:0px;} 

.header_links a:hover{ 
    text-decoration:none; 

而且這是鏈接的樣子:

<a href="http://www.bicmagazine.com/info/read-bic-magazine-online">Read BIC Magazine Digital Edition</a> 

如果我改變.header_links一個所有鏈接改變顏色的顏色。如何指定更改Read BIC Magazine Digital Edition鏈接的顏色。如果你可以把代碼放在一個非常棒的複製和粘貼格式中!謝謝您的幫助。

+0

你可以在鏈接上分享HTML嗎?我們需要更多的上下文來幫助 – Andrea

+0

該網站是bicmagazine.com,我可以複製和粘貼HTML,如果這將有所幫助。 –

+0

是的,請將HTML添加到問題本身。對於HTML,你不需要給我們整個網站,只需要相關的位。 – Andrea

回答

1

好像鏈接是在標題中的第一個鏈接,如果你只能訪問CSS,你可以做如下:

.header_links a:first-child { 
    color: red; 
} 

或者,您可以根據其href屬性的鏈接:

.header_links a[href="http://www.bicmagazine.com/info/read-bic-magazine-online"] { 
    color: red; 
} 

如果沒有這個工作的話,嘗試設置顏色!important

color: red !important; 

爲了覆蓋上一個選擇器。

+0

它工作!謝謝您的幫助。 –

+0

沒問題。樂意效勞 :) – taxicala