2014-02-24 28 views
0

我有以下CSS一個div:問題DIV的定心

.glyphicon-arrow-right { 
    font-size:25px; 
    margin-top:22.66%; 
    margin-left:5%; 
    color: #414141; 
} 

集的DIV中使用CSS

.forwardbutton { 
    width:60px; 
    height:60px; 
    border-radius:50%; 
    margin: 0 auto; 
    border: 1.75px solid #414141; 
    opacity: .3; 
    text-decoration:none; 
} 

當我調整電腦屏幕上,箭頭直接坐在中央。但是,當我在其他設備(平板電腦,上網本/手機)上查看div時,箭頭不居中,高度明顯高於應該顯示的高度。

我想知道是否有人可以確定問題。提前致謝。

編輯:HTML

<a href="work.html"> 
    <div class="forwardbutton"> 
     <div class="front glyphicon glyphicon-arrow-right"></div> 
    </div> 
</a> 
+2

安置自己的HTML了。另外,jsFiddle.net示例可能會有所幫助。 – j08691

+0

你在使用Bootstrap嗎?垂直居中或水平居中?你的圖形的邊緣看起來很可疑 – slynagh

回答

0

也許這可以幫助

float: none !important;margin: 0 auto !important;