如何让读取线右侧的文字与顶行垂直对齐?
查看图片,如何将红线右侧的文字与顶部文字对齐?
答案 0 :(得分:0)
您可以使用CSS的填充元素。
HTML
<div class=format>Certificaiton and E-Test are not required for entry to Carbuitlz but seller must agree to an on-site mechanic inspection at seller's price</div>
CSS
.format{
padding-left:100px;
}
这里是JSFiddle Link
答案 1 :(得分:0)
我想你有这样的事情:
<div class="note">
<span class="label">Note:</span>
<span class="text">Certification and E-Tests are...</span>
</div>
我使用HTML
代码dl
,dt
&amp; dd
(Reference)代表:
<dl>
<dt>Note:</dt>
<dd>Certificaiton and E-Test are not required for entry to Carbuitlz but seller must agree to an on-site mechanic inspection at seller's price</dd>
</dl>
几乎不应用CSS
:
dl dt { float:left; }