我目前正在一個網站上工作,我正在嘗試做一箇中心和響應的按鈕,但它只是不工作!做一個按鈕響應和水平居中
HTML:
<div id="button-container">
<button id="who-are-we" class="font-spec">quem somos</button>
</div>
CSS:
#button-container {
width: 120px;
display:block;
position:relative;
margin-top: 100px;
margin-left: 50%;
text-align: center;
height: auto;
}
#who-are-we {
font-family: Volkorn;
background: white;
border: 4px solid black;
cursor: pointer;
max-width: 180%;
max-height: 100%;
width:220px;
height: 70px;
font-size: 200%;
text-align: center;
}
我試圖與利潤搞亂但必須有這樣做的一個簡單的方法,我也試圖使按鈕較小時窗口變小。
你需要按鈕垂直或水平中心? – ketan 2015-04-06 12:13:51
編輯該部分,完全忘記提及它哈哈對不起 – 2015-04-06 13:08:02