我在div内的php中有以下代码
<div class="stage_container_four">
<?php
if ($answer == $correct && $refer_question == 0) {
echo $xp_value," ", "Points earned.";
}
else {
echo "Already answered or wrong answer.";
}
?>
</div>
在CSS上我有这个:
.stage_container_four {
margin-left:50px;
margin-top:20px;
height: 30px;
float:left !important;
font-family: Oxygen, sans-serif;
font-size:12px;
color:rgba(160,78,0,1.00);
line-height: 30px;
text-indent: 20px;
text-transform:none !important;
background-color:rgba(255,202,0,0.70);
border-radius: 25px;
}
我希望回显的文本从左到右都被标识为20px,但是只有左侧被标识为20px,这是预期的响应,但是右侧的文本在背景色边框结束的地方结束。现在如何从右侧获得20px的边距或标识?
请注意,没有宽度。
谢谢,_oliver
.stage_container_four {
padding:0 20px;
}
在css中删除边距和文本缩进
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句