0
나는 스팬 내에 2 개의 스팬을 가지고 서로 옆에 센터링하고 inner_span up과 inner_span을 내리고 pulse_result_format 스팬의 왼쪽에 정렬합니다. 여백을 시도했습니다 : 0 펄스 결과 형식 범위에서 자동으로 작동하지 않습니다. , display : 인라인 블록;스팬이이 div에서 센터링되지 않는 이유는 무엇입니까?
HTML :
이<div class="pulse_votes_container thumb1">
<span class="pulse_vote_buttons">
</span>
<span class="pulse_result_format">
<span class='inside_span up'>{up}</span>
<span class='inside_span down'>{down}</span>
</span>
</div>
CSS :
.inside_span {
display: inline-block;
width:40%;
border-radius: 3px 3px 3px 3px;
margin: 10% auto 0px 0px;
float:left;
}
.down {
background-color:#FF6E25;
}
.up {
background-color: rgb(70, 136, 71);
}
.pulse_result_format {
display: inline-block;
float: left;
width: 100%;
text-align: center;
font-weight: bold;
color: rgb(255, 255, 255);
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25);
white-space: nowrap;
vertical-align: baseline;
}
.pulse_votes_container {
width:100%;
height:100%;
display: inline-block;
text-align: center;
}