私の目標: .firstCharacter に続くものを除いて、すべての段落をインデントします。
ページの特定のセクションの最初の段落にドロップ キャップがあります。最初のタグの後のすべての段落タグをインデントするように設定しました...
.storyContainer p + p {
text-indent: 1.5em;
margin-top: 0
}
を使用してドロップキャップを設定しています...
.firstcharacter {
float: left;
font-size: 80px;
line-height: 60px;
padding-top: 4px;
padding-right: 8px;
padding-left: 3px;
font-family: 'Droid Serif', serif;
}
私のhtmlはそのままです...
<div class="headline">This is a headline!</div>
<p><span class="firstcharacter">T</span>his text NOT indented because it's first</p>
<p>This text will be indented because it's second.</p>
<p>This text will be indented because it's third.</p>
<div class="someBox">This is some extra box</div>
<p>I want this to be indented but it won't be because it is first after the box!</p>
<p>This text will be indented because it's second.</p>
<div class="headline">This is a headline!</div>
<p><span class="firstcharacter">T</span>his text NOT indented because it's first</p>
<p>This text will be indented because it's second.</p>
<p>This text will be indented because it's third.</p>
<div class="someBox">This is some extra box</div>
<p>I want this to be indented but it won't be because it is first after the box!</p>
<p>This text will be indented because it's second.</p>
これを二乗する方法について何か助けはありますか?
ありがとう!