Scripsit windandwaves:
I would like to to make a form with tickboxes:
[ ] option 1
[ ] option 2
etc...
I suppose that by "tickbox", you mean a checkbox (which is rendered as "[ ]"
by text browsers like Lynx and as a small square by most graphic browsers).
Where the tickbox ( [ ] )is on the same horizontal line as the text.
Do I need to use any tricks?
What's the problem? What is your markup? Using markup like
<fieldset>
<legend>The question here</legend>
<div><label><input type="checkbox" name="o" value="1"option
1</label></div>
<div><label><input type="checkbox" name="o" value="1"option
2</label></div>
...
</fieldset>
is an easy way. You could omit the div markup if you set label { display:
block } in CSS, but that's not advisable, since the stuff would appear on
one line (within the limitations of available width) when CSS is off.
Instead of div markup, you could use <brto create line breaks, but that's
less structural.
If you mean the _exact_ horizontal positioning, then the answer is that by
default, the checkbox and the label text are aligned to text baseline
(vertical-align: baseline). The rendering of checkboxes is not specified in
any specification, but typically the square has its bottom edge on the
baseline. In this sense, it _is_ on the same horizontal line as text, and
this is normally OK. You could fine-tune this by setting vertical-align for
the input elements, but why would you?
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/