Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
Online Tools:

Advertise Here

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:

Male: Female:

Tennis
Reading
Basketball

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 06/20/2006

Revision History: None

Usage Terms: Click here

Your Comments (132)

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 »

This is semantically wrong code as forms should be done using ordered lists.

You are also missing fieldsets as well as using inline CSS which is bad practice.
Posted by Jason Grant on 02/25, 03:13 AM
how can u customize this from the newest post - to oldest??? pls some1 reply
Posted by eizu on 02/29, 07:56 AM
Didn't work for me in FF2, when the label text wanted to be deeper than the inputs; only because the bottom border cut through the text though.
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;}
Posted by Andy on 03/04, 07:24 AM
This is showing cramped on the page, viewing it with ie 7. Also is it possible to adjust backgrounds and add a border stc..? Which i need for my site
Philippine Real Estate
Posted by John on 04/08, 05:32 AM
Thanks for this - I've been looking for a form for ages that is decent.
Posted by Free software downloads on 04/08, 07:15 AM
Thanks for the Script, It is very useful script.
Posted by Gazebo - Music Videos India on 04/19, 09:30 PM
how do i get the submit button to send it to me?
Posted by kv on 05/13, 05:22 PM
as far as i've read through all the pages, some people did tell but those, i don't understand x_x
Posted by kv on 05/13, 05:38 PM
For the complainers, I don't believe this form was intended to be a solve-all-solution. It's more of a starting point for you to lace your pre-existing & currently-working form with a css skin. It works like a dream for me. Awesome!
Posted by Erskin E. Hansen on 05/20, 08:06 AM
Hello

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
Posted by Enrique Meza on 05/20, 10:43 PM

Comment Pages 11 of 14 pages « First  <  9 10 11 12 13 >  Last »

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Supported BB codes: [b], [i], [u], [em], [strike], [strong], [pre], [code], and [blockquote].

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below ("previewing" post does not require it):


Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library