Bryan, 

For starters you don't want that div with a width of 100% plus the
margin and padding values (that will result in a horizontal scrollbar).
Try something like this:

<style type="text/css" media="all">
form {margin: 0; padding: 0;}
form * {margin: 0; padding: 0;}
fieldset {border:solid 1px red; float:left; width:98%;}
fieldset div {float:left; width: 47%; margin-right: 2%;}
label {display:block; float:left; width: 100px; padding-top: 5px;}
input {margin-top: 5px;}
</style>

I reset the form so it has no margin or padding (different browsers have
different defaults), then I reset every element inside the form to have
0 defaults (form *). Because you need to set the label to display:block
(by default they are inline) you'll then need to float the entire
fieldset to stop it from bleeding through (you could alternatively use
an overflow hack but it's not necessary here). In order to get your
preferred layout, I had to wrap each label/input pair inside a div and
float those also.

And the code...

<form action="">
<fieldset>
<legend><strong>Grouped things</strong></legend>
<div>
  <label for="input1" class="NormalTextGrey">Prompt 1</label>
  <input type="text" name="input1" id="input1" />
</div>
<div>
  <label for="input2" class="NormalTextGrey">Prompt text 2</label>
  <input type="text" name="input2" id="input2" />
</div>
<div>
  <label for="input3" class="NormalTextGrey">Prompt text 3</label>
  <input type="text" name="input3" id="input3" />
</div>
  <!--- <span style="width: 100px;">Prompt 4</span> --->
<div>
  <label for="input4" class="NormalTextGrey">Prompt 4</label>
  <input type="text" name="input4" id="input4" />
</div>
<div>
  <label for="input5" class="NormalTextGrey">Prompt text 5</label>
  <input type="text" name="input5" id="input5" />
</div>
<div>
  <label for="input6" class="NormalTextGrey">Prompt text 6</label>
  <input type="text" name="input6" id="input6" />
</div>
</fieldset>
</form>

Works in Opera 8/9, IE 6, NS 6/7 and Firefox 1.07. I *think* that's what
you want.

HTH
Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224244
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to