[thelist] Styling in-line elements

Barney Carroll barney.carroll at gmail.com
Tue Mar 17 13:36:01 CDT 2009

> My biggest was complaint was if someone did <div><p><label/><input/> and
> then styled the label as such that if I -did- find that the label was
> covering unneeded text and fixed it that the label would cause the layout
> to
> break.

Eek. Yeah. But you don't want a label in flowing prose. You might be able to
argue that a label itself can contain flowing text, but vice-versa sounds
like madness to me.

> But then I get into the question of "Should input elements be their own
> paragraph?". Perhaps they should be placed in their own div, since they're
> not text. In which case, that answers the inline debate: they're already
> separate, there's no need to style an inline element with block formatting.

An inline set of form elements sounds horrible to me. Forms are notoriously
hard to typeset and their individual components should be very carefully
laid out. Every label and input is a block for me, especially because
vertical padding is so important — you can't rely on simple line-height when
you're dealing with something that has edges.

> Maybe I need to dig far deeper into the HTML spec. Or, maybe I'm the only
> moron with this sort of question.
> > Mate of mine recently told me he didn't bother with float: and just made
> > everything display:inline. I just kept my eyes firmly fixed on him and
> > slowly backed out of the room…
> Your friend isn't of a psilocybian persuasion, is he?

No, but he'd still make a pretty good X-File.

More information about the thelist mailing list