Home › Forums › CSS › how to inherit from nonparent element › Reply To: how to inherit from nonparent element
March 2, 2016 at 10:59 pm
#238630
Nick Levinson
Participant
Solved: Within one sole h1 element, I write the title and the subtitle, but I separate them with a br element (optionally followed by a colon and, if I want to indent the subtitle, by nonbreaking spaces), enclose the nonbreaking spaces and the subtitle in a span element with a class or an id, and style the span with font-size at somewhere around 75%. I tested inheritance by setting h1 to red and the spanned-classed content also turned red. (Adding microdata is more complicated, involving a few span elements.) Please comment if you think this’ll be problematic.