У меня ниже HTML и CSS, здесь span
выровнен влево. Здесь padding-right
изменяется в зависимости от размера текста span
. Есть ли способ, когда в отступе находится одна и та же строка, не зависящая от размера текста span
.Выравнивание пролета с равным заполнением
.chapter {
margin-left: 5.0em;
margin-right: 0.2em;
}
.para {
text-indent: 0em;
margin-top: 0.85em;
}
.para span.phrase {
text-indent: 0em;
margin-left: -4.75em;
font-weight: bold;
padding-right: 2.8em;
}
<div class="chapter">
<div class="para">
<span class="phrase">8.04</span>The padding shorthand property sets all the padding properties in one declaration. This property can have from one to four values</div>
<div class="para"><span class="phrase">8A.03</span>
The padding shorthand property sets all the padding properties in one declaration. This property can have from one to four values</div>
<div class="para"><span class="phrase">8AA.01</span>The padding shorthand property sets all the padding properties in one declaration. This property can have from one to four values</div>
</div>
Благодаря
Спасибо, Это работало :-) – user3872094
Не забудьте принять его, если он hepls мой друг :) – freewheeler
Ваше решение не будет работать, если текст из первой Столбец длинный: http://jsfiddle.net/8jhaujdv/ –