if this isn’t your area of interest, stop reading now….
I want some ideas about rendering marginal notes in HTML.
EEBO TCP has _many_ examples of very complex structured structured notes with
paragraphs, lists, tables etc within them. So naturally I expect to make the
<note> into a <div> with CSS properties to make it float left or right. Fine so far.
But the <note> in the TEI XML occurs inside (shall we say) a <hi> element
inside a <p>, which I would naturally be rendering as a <span>. but a <div>
inside a <span> is not allowed in the tiny brain of HTML, because it doesn’t realize
its being floated off.
So what’s a boy to do?
a) forget about HTML validity and let the browsers just do it. problem: epub checking fails,
and its possible some epub renderers will therefore give up
b) make everything, everywhere, be a <div> and sort it out with display-style in CSS
c) make everything, everywhere, be a <span> and sort it out with display-style in CSS
d) use HTML5 <aside>, but no thats a flow-level element too
e) move the <div> outside the <span>, up enough levels until its valid. but that mean it loses context
f) split the <span (and any ancestor <span>) in two, insert the <div>, and restart the <span>
g) scream and shout and kick
The default is g). I am inclining to have to put in the work to support f), but it’s not going to be fun.
Does anyone have any advice? (“use tables for layout” doesn’t actually help much, to be honest)
Director (Research) of Academic IT
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Não sou nada.
Nunca serei nada.
Não posso querer ser nada.
À parte isso, tenho em mim todos os sonhos do mundo.