Style Sheets
  Home arrow Style Sheets arrow Taming the Select
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 
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? 
STYLE SHEETS

Taming the Select
By: Chris Heilmann
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 18
    2004-11-15

    Table of Contents:
  • Taming the Select
  • DOM to the rescue
  • But wait, there is more!
  • The Script

  • 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


    Taming the Select


    (Page 1 of 4 )

    So, having a good time with SELECT? Probably not. That's why today, Chris Heilmann will be teaching you the ups and downs of making things look the way your client wants things to look. After all, you do want to get paid, don't you?


    Support File Available Here


    Of all the form elements in HTML, SELECT is the enfant terrible. It behaves nicely when kept as is, but as soon as we try to teach it some style manners, it'll go ballistic on us. Some browsers allow for border, others allow for a different font, some just don't allow any styling at all.

    Partly this is our own fault; we shouldn't try to redesign form elements to blend into the page design. Users know their form elements and know what to do with them, if we change the look of the elements, they will have to adapt. Form elements cannot be recognized subconsciously any longer - the user has to find them. It is up to us to decide if we can afford that.

    That being true, we will still have to redesign form elements, as the design or the client dictates it, and we want them to pay us. It doesn't hurt mentioning the drawbacks, though.

    Styling the select

    One of the most designer-annoying features of SELECTs is that they are as wide as their longest option. We cannot force them to have a certain width and make the options wrap. Most browsers will cut off options that are longer than the defined width, something that may render them useless.

    Taming the Select

    Example of how different browsers render a styled select with a fixed width

    More Style Sheets Articles
    More By Chris Heilmann


       · I would be glad to get any feedback from Mac users on this technique, as I cannot...
       · As far as I remember Mac Firefox didn't have a problem.The problem I have with...
     

    STYLE SHEETS ARTICLES

    - Image Replacement CSS Techniques
    - Using BlueTrip`s Success, Notice and Error C...
    - More Uses for the Thin and Caps CSS Classes ...
    - Styling Definition Lists with the BlueTrip C...
    - Styling Unordered and Ordered HTML Lists wit...
    - Using the BlueTrip CSS Framework`s Thin and ...
    - Adding Borders to Web Page Columns with Blue...
    - Introducing the BlueTrip CSS Framework
    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek