View Single Post
Old 06-15-2020, 12:15 PM   #1
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,590
Karma: 14328510
Join Date: Nov 2019
Device: none
h? font size adjusting

In my html I have

Code:
 <h2>One <span>Old Man Arlo’s dogs</span></h2>
The text in the span gets moved to its own line with display:block. I also want it larger than the h2 text. In my css I have

Code:
h2 span {
    display: block;
    font-size: larger;
}
I don't specify a font-size in the css for the h2 tag; I'd rather keep things simple and let the ereader use whatever size it uses. I'd like to make the h2 text even smaller but if I put font-size:smaller in the css for the h2 that also makes the text in the span smaller. Is there a way to make the h2 text smaller and keep the span text larger, only with css? (Without adding a span around the "One" for example.)
hobnail is offline   Reply With Quote