2016-08-04 26 views
0

利潤率這裏是我的問題的圖像:錨按鈕需要在兩側

enter image description here

如果你看看我的按鈕一路對齊,有各自的兩側。我需要在左右兩側留出一些邊緣,以便它們不會一直對齊。 我嘗試添加利潤率左和保證金的權利,並沒有採取任何行動

這裏是我的CSS:

.profileinfo { 
     position: relative; 
     background-color: #202020; 
     box-sizing: border-box; 
     padding: 20px 20px 25px 20px; 
     -webkit-overflow-scrolling: touch; 
} 

.profileinfo a { 
     position: absolute; 
     right: 30px; 
     top: 34px; 
     display: block; 
     width: 260px; 
     box-sizing: border-box; 
     padding: 18px 0 16px 0; 
     font: 25px/25px '-apple-system',BlinkMacSystemFont,'HelveticaNeue',Roboto; 
     text-decoration: none; 
     text-align: center; 
     text-transform: uppercase; 
     color: #ffffff; 
     background-color: #13cc3a; 
     border: 0; 
     border-radius: 5px; 
     margin: 10px auto; 
     overflow: hidden; 
} 

a.genericbuttonright { 
     right: 0; 
     margin: 0; 
     width: 360px;  
} 

a.genericbuttonleft { 
     left: 0; 
     margin: 0; 
     width: 360px;     
} 

這裏是我的HTML:

<div class="profileinfo"> 
<h1></h1> 
<br> 
<a class="genericbuttonleft" data-ripple-color="#ffffff" onclick="animateripple(event,this)" href="/profile/search">Search Profiles</a> 
<a class="genericbuttonright" data-ripple-color="#ffffff" onclick="animateripple(event,this)" href="/profile/create">Create a Profile</a><br><br> 
</div> 

回答

0

只要改變左/右值。

Codepen Demo

a.genericbuttonright { 
     right: 10px; /* here */ 
     margin: 0; 
     width: 360px;  
} 

a.genericbuttonleft { 
     left: 10px; /* here */ 
     margin: 0; 
     width: 360px;     
}