CSS Library: Form CSS: Here
CSS Tableless Form
Author: Dynamic Drive
This is a tableless CSS form which you can use as a template for implementing your own lightweight form. It uses a combination of float and negative margins to create a two column layout for the form. One issue with the form is IE6's three pixel jog bug, which is addressed in the demo manually, by offsetting the jogged checkboxes with an additional margin. You may wish to implement a more thorough fix, though it will increase the size of the code. IE7 does not suffer from the 3 pixel bug.
Demo:
The CSS:
Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.
Comment Pages 11 of 14 pages « First < 9 10 11 12 13 > Last »
My version below, works so far in IE6/7, FF2:
<fieldset>
<label for="fish"> Fish </label>
<div>
<input name="fish" id="fish" type="checkbox" value="haddock" > Haddock
<input name="fish" id="fish" type="checkbox" value="cod" > Cod
</div>
</fieldset>
Cutdown CSS:
fieldset label {width:250px; float:left;}
fieldset div {float:left;}
Philippine Real Estate
I'd like to use this code since it looks great, the problem I have is that labels are not displayed, boxes are aligned to the left, but no labels for my boxes.
Thanks
Comment Pages 11 of 14 pages « First < 9 10 11 12 13 > Last »









You are also missing fieldsets as well as using inline CSS which is bad practice.