왜 링크를 사용하지 않고 flex를 사용하여 단추를 가운데에 배치 할 수 있습니까? <a> 요소를 flex div 내에 세로로 가운데에 배치하려면 어떻게합니까?
이 바보 같은 질문 경우 죄송합니다
#quote-btn-div {
display: flex;
}
#quote-btn,
#twitter-link {
background-color: #999;
/* Green */
border: none;
width: 300px;
height: 100px;
margin: 0 auto;
color: white;
text-align: center;
text-decoration: none;
font-size: 16px;
}
#twitter-link {
background-color: red;
}
<div id="quote-box">
<div id="quote-btn-div">
<button id="quote-btn">New Quote</button>
<a id="twitter-link">Twitter link</a>
</div>
</div>
은 어디 링크로 가고 싶어합니까? 그리고 당신은 수평 중심에 있다는 것을 의미합니까? 가장 쉬운 방법은 어쩌면 부모 div가'# quote-btn-div'이기 때문에 twitter 링크를 어딘가에 옮기는 것입니다. –