2017-05-27 40 views
-2

抱歉,傢伙即時新代碼,所以這樣的事情可能看起來像一個愚蠢的問題,但這是我第一次無法找到任何答案在線。拉右班不是拉右而是放下其他按鈕

基本上就像標題說拉右類不拉正確,而是下降其他按鈕。看看我的codepen測試文件https://codepen.io/goceman86/pen/xdeoQv

繼承人的HTML代碼......到目前爲止,我只嘗試了最後一個按鈕的右側拉動作用

<header> 
    <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" 
integrity="sha384- 
BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" 
crossorigin="anonymous"> 
    <link rel="stylesheet" type="text/css" 
href="http://fonts.googleapis.com/css?family=Lobster" /> 
</header> 

<div class="container-fluid"> 

    <button class="btn-primary mebtn"><a href="#" class="btnfont" style="font-family:'Lobster'; font-size:1.8em;">InHo Jo</a></button> 

    <button class="btn-primary ambtn"><a href="#" class="btnfont" style="font-family:'Lobster'; font-size:1.8em;">About me</a></button> 


    <button class="btn-primary profbtn"><a href="#" class="btnfont" style="font-family:'Lobster'; font-size:1.8em;">Profile</a></button> 



    <button class="btn-primary cmbtn"><a href="#" class="btnfont pull-right" style="font-family:'Lobster'; font-size:1.8em">Contact Me</a></button> 
</div> 
+0

請將您在S.O.中的所有代碼寄出。沒有鏈接到其他網站。 – Trimax

回答

0

您可以從最後一個按鈕鏈接刪除.pull-right在這裏你不需要它。但是,如果你想爲javasript/jQuery的.pull-right類名,您可以添加此風格:

.pull-right { 
    float: none !important; 
} 

但是,如果你希望你的最後一個按鈕(不是它的內在聯繫)是在頁面的右側,添加float: right;到按鈕。

<button class="btn-primary cmbtn" style="float: right;"><a href="#" class="btnfont pull-right" style="font-family:'Lobster'; font-size:1.8em">Contact Me</a></button> 
+0

仍然不適用於我''''按鈕class =「btn-primary cmbtn」>Contact Me ''' – InHo

+0

在你的代碼中你忘記了這個:'style =「float:right;」'for button。請複製我答案的最後一行,並將其完全粘貼到代碼中(而不是最後一個按鈕)。 –