chiark / gitweb /
Convert the fading <div> in the Web page back to a <span>
authorBen Harris <bjh21@bjh21.me.uk>
Fri, 27 Sep 2024 18:07:50 +0000 (19:07 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Fri, 27 Sep 2024 18:07:50 +0000 (19:07 +0100)
commitdbf936f949c9797ce95e6b0bb2668447d9a0a0e3
tree7e03a13eaa60db4e5bba523bb1b303951b531f6d
parent3b920b86982ab8e0de639a253a098268b433e170
Convert the fading <div> in the Web page back to a <span>

HTML doesn't allow <div> inside <h1>.  I found before that using a
<span> caused the background not to work.  That seems to be down to CSS2
section 10.6.1, describing inline, non-replaced elements: "The height of
the content area should be based on the font, but this specification
does not specify how."

Happily, we can just define this particular <span> to be a block
element, so that it behaves like a <div> even though it's a <span>.
That works fine, and because we're only using it to get a well-defined
content area it doesn't matter if it's ineffective when the stylesheet
is missing.
bedstead.css
index.xhtml