benzen
09-11-2011, 12:13 AM
Hi,
I have the following form:
<form action="#" method="get">
<fieldset>
<legend>Date Range</legend>
<label for="startdate">
<span>Start Date:</span>
<input type="text" name="startdate" id="from"
maxlength="20" />
</label>
<label for="enddate">
<span>End Date:</span>
<input type="text" name="enddate" id="to"
maxlength="20" />
</label>
</fieldset>
<fieldset>
<center><input value="Create Report" type="submit"></center>
</fieldset>
</form>
And I want to center the form on the screen but I don't want to center all the contents of the form.
I have tried <Div align=center> but this centers everything.
I have css code:
fieldset {margin: 1em 5px; padding: 10px 10px; width: 170px;}
legend {padding: 0.2em 0.5em; color:green; font-size:120%; text-align:left;}
for the fieldset and I want the legend to stay to the left side, but everytime I try css in DIVs I always end up centering everything.
Any help would be greatfully received.
Ben
I have the following form:
<form action="#" method="get">
<fieldset>
<legend>Date Range</legend>
<label for="startdate">
<span>Start Date:</span>
<input type="text" name="startdate" id="from"
maxlength="20" />
</label>
<label for="enddate">
<span>End Date:</span>
<input type="text" name="enddate" id="to"
maxlength="20" />
</label>
</fieldset>
<fieldset>
<center><input value="Create Report" type="submit"></center>
</fieldset>
</form>
And I want to center the form on the screen but I don't want to center all the contents of the form.
I have tried <Div align=center> but this centers everything.
I have css code:
fieldset {margin: 1em 5px; padding: 10px 10px; width: 170px;}
legend {padding: 0.2em 0.5em; color:green; font-size:120%; text-align:left;}
for the fieldset and I want the legend to stay to the left side, but everytime I try css in DIVs I always end up centering everything.
Any help would be greatfully received.
Ben