Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS中div内文本的左右边距(ident)_Css - Fatal编程技术网

CSS中div内文本的左右边距(ident)

CSS中div内文本的左右边距(ident),css,Css,我在一个div中有以下php代码 <div class="stage_container_four"> <?php if ($answer == $correct && $refer_question == 0) { echo $xp_value," ", "Points earned."; } else { echo "Already answered or w

我在一个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>
我希望回显文本从左侧和右侧都标识为20px,但是只有左侧标识为20px,这是预期的响应,但右侧文本在背景色边框结束处结束。现在如何从右侧获得20px的边距或标识

请注意没有宽度

谢谢, _奥利弗


删除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;
}
.stage_container_four {
    padding:0 20px;
}