CSS Tutorials

Styling Forms

Back to Tutorial Categories

Prettier Accessible Forms

I wanted to create something that anyone could easily reuse on any project: a style sheet that, when applied to a correctly marked up HTML form, would produce the basis of the required layout.
By: Nick Rigby

Customized input elements

Ever wanted to match the look of your HTML forms with the rest of your website? This article demonstrates how to apply customized backgrounds to HTML forms, while preserving stucturally clean markup and accesibility.
By: Søren Madsen

Styling form controls

A question that is frequently asked in forums like the css-discuss mailing list is how to style form controls in a consistent way across platforms.
By: Roger Johansson

Form field hints with CSS and JavaScript

It's a basic example of how helpful a little JavaScript and CSS can be in a form. Instead of the input hints always showing and potentionally cluttering a very simple form, only the hint for the currently focused input will show. This article will show a way to do this.
By: The CSS Guy

Styling even more form controls

This is a follow-up to my previous post about Styling form controls. This reference shows how differently form controls are rendered by different web browsers and operating systems. It also shows that little can be done to make form controls appear the same across browsers and platforms.
By: Roger Johansson

Checkbox & Radio Input Replacement

This technique will allow you to style the label however you wish using CSS, and the actual input control will be hidden. The form will still collect data as it normally would because the label itself will trigger the hidden input control. If javascript is disabled no inputs will be hidden and the form is still be fully functional.
By: Chris Erwin

Rounded Form Buttons

Now you can style both the a tag and button tag in this super easy and light-weight solution. Tested and compatible with IE6, IE5.5, IE7, Safari 2, Firefox 2, Opera 9.
By: Hedger Wang

Form field hints with CSS and JavaScript

It's a basic example of how helpful a little JavaScript and CSS can be in a form. Instead of the input hints always showing and potentionally cluttering a very simple form, only the hint for the currently focused input will show. This article will show a way to do this.
By: The CSS Guy

Style Your Website's Search Field with JS/CSS

Continuing to provide unobtrusive solutions, CSSG is happy to present SearchField. It serves as a way to style your search field and add behavior without any additional JavaScript or modifications in your markup.
By: Alen Grakalic

Beautiful CSS Forms

This tutorial explains how to design a beautiful form (Facebook inspired) using a clean CSS design with only "label" and "input" tags to simulate an HTML table structure.
By: Antonio Lupetti

Clean and Pure CSS FORM Design

How to design a pure CSS form without using html tables.
By: Antonio Lupetti