2016-08-04 6 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;     
} 
関連する問題