我的网页中有一个项目标题作为标题。该项目标题位于名为“pagetitle”的 div 中。在项目标题之后,我有两个单词,一个在左边,另一个在右边。我希望“pagetitle” div 中的所有内容都使用白色背景,在这两个词之后的底部留下一点空间。我已经为这两个词尝试了“padding-bottom:10px”。但是,白色背景不会延伸到包含的 10 像素。我可以知道我该怎么做吗?
干杯,郑红
<div class ="pagetitle" style="background-color:black;">
<center style="padding: 10px 0 0 0">Executive Summary Dashboard<center>
<br><left style="float:left; padding:0 0 10px 10px;">Subject Selected:</left><right style="float:right;padding:0 10px 10px 0; background-color:green; margin-bottom:10px;">Time frame:</right></br>
</div>