Quote:
Originally Posted by hobnail
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.)
|
Code:
<h2>One <span class="h2">Old Man Arlo’s dogs</span></h2>
Code:
.h2 {
font-size: larger;
}
That will do what you want.