开发者

table-cell spacing

I want to be able to put spacing bettween the center of the 2 p tags. I also wanted them to act like a table cell

HTML

        开发者_如何学运维<div class="spent">
          <p>Total spending monthly</p>
          <p>$200</p>
        </div>

CSS

   .spent p {
      display: table-cell;
       padding: 10px 0px 0 10px; 


Never mind I just needed to set a width on the first p tag. Here is an example in case it helps someone Example:

.spent p:first-child{
   width:200px
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜