Printed from BasicTips.com, FREE helpful articles and tips for Webmasters and Business Owners
Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.BIZ
All rights reserved. Republication in whole or in part in any form is not permitted.

Sponsored by BasicTemplates.BIZ
Website Templates with External CSS and Removable Graphics
http://www.BasicTemplates.biz

Co-Sponsored by Effective-Website-Secrets.com
Teaching webmasters effective web development and marketing techniques via free podcasts.
http://www.Effective-Website-Secrets.com

Category: CSS
Resizing Form Input Boxes, Buttons, and Text with CSS
By BasicTemplates with External CSS

Resizing Form Input Boxes, Buttons, and Text with CSS

Click Here to View Live ExampleThanks to the magical process of CSS you are not limited to the standard size boxes, buttons and the actual input text for your web forms. Here's a quick and easy way to change the size of input boxes, submit and reset buttons, and the actual text your visitors input into your web forms.

Copy/paste the custom class CSS code below into your external stylesheet. If you are not familiar with the different methods of CSS and how or when to use them, be sure to read our article, External, Internal or Inline? Which Method is Best?"

.form { font-size: 9px; color=#990000; }

The font-size property in this code is set to 9 pixels and controls the size of the input box, text entered into the input box and the text on the submit button if this custom class is assigned to these HTML form elements. We also added the color property and indicated a red hex code. This displays red text that is entered into the input boxes. See below:

Name: <input type="text" name="name" class="form">
Email: <input type="text" name="email" class="form">
<input type="submit" name="Submit" value="Submit" class="form">

You could easily create a separate form custom classes for your submit button and resize or recolor it as you wish using this same concept.

Click Here to view live comparison examples of a standard web form and a revised version using this mini-tutorial.

Related Articles:

Colorize Your Web Page Forms using CSS
Removing Space Around Forms
HTML Forms: Is Your Site Interactive?
Custom Form Buttons
Drawing Attention to Your Forms