HTML
  Home arrow HTML arrow Page 2 - Good Form, Jack
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Good Form, Jack
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 18
    2004-05-12

    Table of Contents:
  • Good Form, Jack
  • You Gotta Have Class
  • Getting a Little Fancy
  • Prevent Annoying Error Messages
  • Give Them a True GUI

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Good Form, Jack - You Gotta Have Class


    (Page 2 of 5 )

    Humans have a funny tendency to enjoy an aesthetically pleasing environment. We acknowledge this when we put a great deal of effort into designing a fancy Flash splash intro for our web site and spend hours tweaking the global style sheet. So then how could we forget about forms, leaving them to their default, boring look? Yes, if we type in <input type=”text” />, we should get something that looks like this:

    HTML Forms

    Now, I say 'should', because the rendering depends entirely on the client at this point. Yes, different browsers and even different operating systems will render the default input field how they see fit, or at least how their designers see fit. That's no good.

    So when you're defining your global style sheets, don't leave out your input tags. You can create one style by defining the input tag style, but what I prefer to do is divide them out by type. I might create a class called input.textbox, and for text fields set the class=”textbox”. Generally I would redefine the default border and text family. Try this style on for size:

    input.textbox {
    font-family: Verdana, Geneva;
    font-size: 8pt;
    color:#333333;
    border: 1px solid #666666;
    height: 18px;
    }

    You'll find that this renders a much more crisp input box, that is consistent across your website. By the way, don't leave the size of the field up to the browser to determine. It is always a good idea to set the size attribute of an input field, but an even better idea to hard-code the width in pixels.

    More HTML Articles
    More By Justin Cook


     

    HTML ARTICLES

    - Using a 3D HTML Table as a Recordset
    - Building a 3D HTML Table
    - Maximizing and Restoring HTML Images: Layer ...
    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT