Scripsit
du****@gmail.com:
<legend class="question"><span class="questionNumber">6.</span>If the
answer to question 11 is yes, do you think they provide adequate
services for advanced degree employment opportunities?</legend>
From the styling point of view, <legendis a nightmare. The common
rendering of <legendin browsers cannot be described in CSS terms, and CSS
settings have varying effects on it.
One of the problems is that normal wrapping does not take place, and setting
white-space: normal doesn't change this. You can insert explicit line breaks
in the markup, using <br>, but that would be awkward.
From the markup point of view, the problem of excessively long <legend>
texts should not appear. According to the HTML 4.01 specification, "The
LEGEND element allows authors to assign a caption to a FIELDSET. The legend
improves accessibility when the FIELDSET is rendered non-visually." It has,
among other things, the following example:
<FIELDSET>
<LEGEND>Current Medication</LEGEND>
Are you currently taking any medication?
<INPUT name="medication_now"
...
</FIELDSET>
So the general idea is that the legend is a short caption, or like a
low-level heading. Without context, it is of course impossible to make a
specific suggestion on the formulation. But generally, a legend that needs
to wrap (in fairly normal browsing situations) is too long and needs
reformulation.
Some questions are pretty long and cannot fit in the layout.
Just put the questions inside the <fieldsetafter the <legendelement.
.question {font-size: 100%; font-weight: bold; }
Bolding long texts is generally counter-productive, since bold text is more
difficult to read. The legend might be bolded, but the question should be
normal text so that it can be read conveniently.
What should I so long questions can be broken into multiple lines to
fit in the layout that has 450px width?
For all that you can know, 450px might not accommodate a _word_ without
wrapping. Stop imposing fixed widths, _especially_ on forms. A page with a
form is not supposed to be primarily an esthetic experience but a user
interface. Let form follow function. The user may need all the space
available.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/