in comp.infosystems.
www.authoring.stylesheets, Timo wrote:[color=blue]
> Thanks to all who responded with helpful suggestions. Lauri Raittila's
> crystal ball was indeed correct: setting the line-height of the container to
> 1.4em eliminated the problem.
>
> To respond to Michael Winter's critique regarding the "convoluted floating
> DIV/SPAN mess": I wrapped elements in that way because I was otherwise
> unable to get desired positioning and wordwrap flush margin control. I'd be
> grateful to learn how to get the following effects without those messy
> containers:
>
> [ ] {controllable amount of space here} This is a long label for
> checkbox 1 and it is also an href with an onclick handler
> [ ] {controllable amount of space here} This is a long label for
> checkbox 2 and it is also an href with an onclick handler[/color]
Why you have labels marked a with onclick handlers? Wouldn't it be much
better to use label element? IIRC, it works even in IE.
[color=blue]
> NOTE: The labels are titles of articles; user clicks on label to go to the
> article; but the titles can be very long, so they need to wrap. When they do
> wrap, it needs to look like this, aligned flush on the left:[/color]
This seems strange. URL?
[color=blue]
> [ ] This is a long label for checkbox 1 and it is
> also an href with an onclick handler[/color]
There is several ways. Remember that if you have container for one
element inside, it is usually not necessary.
1. table
2. use label element with for attribute outside checkbox (don't float
label element, there is n+1 bugs in semirecent versions of different
browsers for label elements). But margin to label element
If you can't use label element, as it might be becasue your strange way
of handling form, use table...
I did somthing like this few years ago:
http://www.student.oulu.fi/~laurirai...2.html#lahteet
(content is some optimistic bullshit about XML in Finnish)
It is of course possible to do it other ways as well, but I won't
recommend. Anyway, you don't need any dummy containers, like <b> in my
example, as input already is an element.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173