2013-10-07 31 views
4

我在構建我的WordPress網站時遇到了一個奇怪的問題。所有引導按鈕內的鏈接在Firefox中都不是活動的。鏈接在Firefox的引導按鈕中不活躍

這是什麼原因造成的?

下面是HTML輸出:

<button class="btn pull-right" role="button"> 
<a href="http://domain.dev/?cat=4" name="View all News"> 
    All News 
</a> 
</button> 

這裏的CSS:

.home #primary #home-more .btn { 
background-image: url("../img/home-button-sprite-more.png"); 
background-repeat: no-repeat; 
margin-right: 0px; 
background-color: transparent; 
padding: 13px 40px; 
background-position: 20px 0px; 
} 
button.btn { 
display: inline-block; 
padding: 13px 24px; 
margin-bottom: 0px; 
margin-right: 10px; 
font-size: 10px; 
text-transform: uppercase; 
font-weight: bold; 
line-height: 1; 
text-align: center; 
vertical-align: middle; 
cursor: pointer; 
border: medium none; 
border-radius: 0px 0px 0px 0px; 
white-space: nowrap; 
-moz-user-select: none; 
} 
+0

你是什麼意思'不活躍'? –

+0

@JoshC我的意思是不工作,當你點擊它,它不會帶你到頁面 –

+0

可能與CSS沒有任何關係。這是HTML的結構。也許鏈接改變了,或者目錄已經移動了..只是一些建議。 –

回答

16

相反的,

<button class="btn pull-right" role="button"> 
<a href="http://domain.dev/?cat=4" name="View all News"> 
    All News 
</a> 
</button> 

你必須使用,

<a href="http://domain.dev/?cat=4" name="View all News"> 
    <button class="btn pull-right" role="button"> 
    All News 
    </button> 
</a> 

或者,

<a href="http://domain.dev/?cat=4" title="View all News" class="btn pull-right"> 
    All News 
</a> 
+0

爲什麼會發生這種情況?或者兩個代碼有什麼區別? – akashrajkn

1

什麼嘗試@Devo曾建議別的嘗試這個

<a class="btn btn-primary" href="http://domain.dev/?cat=4">All News</a> 

希望這有助於。