Print

Print


Hi Sebastian,

There's no reason, surely, that you can't create a span with display: block and float: right? I do that all the time. Another option for positioning is not to float, but to set it as position: absolute, specify a width, and right: 2em or something like that, so the thing appears as a block next to the right edge.

Cheers,
Martin
________________________________________
From: TEI (Text Encoding Initiative) public discussion list [[log in to unmask]] on behalf of Sebastian Rahtz [[log in to unmask]]
Sent: October 29, 2014 5:32 AM
To: [log in to unmask]
Subject: html from TEI, technical question about marginal notes

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)
--
Sebastian Rahtz
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.