Thread: CSS Question
View Single Post
Old 11-09-2020, 04:08 PM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,784
Karma: 169712580
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by hobnail View Post
Then for the specific type things like
Code:
div.article {
    font-family: sans-serif;
}
div.letter p {
    font-style: italic;
    hyphens: none;
}
And to use it it's
Code:
<div class="block letter"><p>blah</p><p>blah</p></div>
As a side note I don't understand (or have forgotten) why the div.article doesn't need the space p while the div.letter does. E.g., if you do
Code:
<div class="article block">First article sentence.</div>
<div class="letter block">First letter sentence.</div>
The article sentence is sans serif but the letter sentence is not italic.
The letter sentence requires a p tag for the "div.letter p" to apply -- it applies to p elements inside a div element.
DNSB is offline   Reply With Quote