I have a the following html:
<label>blah</label>
<input type=text ... />
I want the label to be on one row, and below it the input box.
currently it is on the same line, do I have to use a clear?
I have a the following html:
<label>blah</label>
<input type=text ... />
I want the label to be on one row, and below it the input box.
currently it is on the same line, do I have to use a clear?
You could throw in a breakline (<br />
) between them or put each in its own div.
<label>blah</label>
<br />
<input type=text ... />
Use a line break.
You can put a css class or style that would change display to block:
<label style="display:block">blah</label>
<input type=text ... />
The simplest way is to add a <br>
after </label>
.
Alternatively you could use div tags or a table with two rows.
<label for="fldAge">Age:</label>
<p>
<input type="text" name="Age" id="fldAge" />
</p>
This also causes the browser to render text associated with an input with a focus rectangle, and enables the user to focus the field by clicking anywhere in the associated text instead of just the input field control.