In creating a dictionary entry that has two senses I would like the first entry to be on the same line as the headword/lexeme and part-of-speech [not showing correctly] and the second entry to be on a new line[showing correctly] .
I've tried
.Sense_Number:first-of-type { display: inline; color: red ; font-weight: bold ; }
and
span[class=Sense_Number]:first-of-type { display: inline; color: red ; font-weight: bold ; }
to select it to no avail.
The CSS:
.Sense_Number::after { content: ") " } /* non-breaking space following )*/
.Sense_Number::before { content: " " }
span[class=Sense_Number]:first-of-type { display: inline; color: red ; font-weight: bold ; }
.Sense_Number { display: run-in; color: blue ; font-weight: bold ;}
Note: I had similar problem with Part_Of_Speech but solved it with adding attribute of first-of-type. I'm just trying to figure out why "first-of-type" selector doesn't work for me. Example showing attribute working.
I've tried
.Sense_Number:first-of-type { display: inline; color: red ; font-weight: bold ; }
and
span[class=Sense_Number]:first-of-type { display: inline; color: red ; font-weight: bold ; }
to select it to no avail.
The CSS:
.Sense_Number::after { content: ") " } /* non-breaking space following )*/
.Sense_Number::before { content: " " }
span[class=Sense_Number]:first-of-type { display: inline; color: red ; font-weight: bold ; }
.Sense_Number { display: run-in; color: blue ; font-weight: bold ;}
<p>
<span class="Lemma">ajar</span>
<span class="Part_Of_Speech first-of-type">vn</span>
<span class="Sense_Number">1</span>
<span class="Definition_English">teach, train in knowledge</span>
<span class="Definition_National">mengajar, atau mendidik (pengetahuan)</span>
<span class="Sense_Number">2</span>
<span class="Definition_English">punish or correct inappropriate behaviour; scold, discipline</span>
<span class="Gloss_National" >didik, hukum, ganjar, hajar</span>
</p>
Note: I had similar problem with Part_Of_Speech but solved it with adding attribute of first-of-type. I'm just trying to figure out why "first-of-type" selector doesn't work for me. Example showing attribute working.
span[class~=first-of-type] { display: inline; font-style: italic; font-size: 90%; }
.Part_Of_Speech {display: run-in; font-style: italic; font-size: 90%; }
Jim Albright
Wycliffe Bible Translators