View Single Post
Old 06-15-2020, 01:14 PM   #5
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
Quote:
Originally Posted by Jellby View Post
My suggestion: don't rely on "whatever size it uses" being anything reasonable, set what you want, but in relative terms, e.g.:

Code:
h2 { font-size: 100% }
h2 span { font-size: 120% }
Anyway, relative sizes are relative to the container element, so yes, changing the h2 size will affect the absolute size of the span inside, but not its relative size, it will always be 120% of whatever a bare h2 is.

I like this idea; thanks. I have an add-on css file for these books that have two lines for the chapter title, the ones where the h2 has a span in it. The add-on css file overrides stuff in the main css file. In the add-on I could use whatever percentages work for me.

Last edited by hobnail; 06-15-2020 at 01:19 PM.
hobnail is offline   Reply With Quote