SlideShare una empresa de Scribd logo
1 de 91
Descargar para leer sin conexión
CSS & WEB FORM ELEMENTS
 Christopher Schmitt | http://twitter.com/teleject
http://brightbytes.com/phineasgage/index.html
(   )=
     /   (   )
FORM ELEMENTS

• Checkboxes          • Select:

• Input:                • Multiple   Items

  • File                • Single   Item

  • Radio             • Submit    Button

  • Text              • Textarea
CSS PROPERTIES

• background-color      • height
• background-image      • letter-spacing
• border                • line-height
• border-color          • margin
• border-style          • padding
• border-width          • text-align
• color                 • text-decoration
• font-family           • text-indent
• font-size             • width
• font-weight           • word-spacing
7.2    5    8.5   1.5    3   1
      5.5    9    2.0   4b
       6          3.0
       7
      8b2
7.2         9     1.5    2
                  2.0    3
                  3.0   4b
3,520
 screengrabs
RADIO BUTTONS
CSS HEIGHT
  FF 2


  FF 2


  FF 3


Chrome 1
CSS WIDTH
  FF 3

  FF 3

Safari 3

Safari 3

Safari 4b

Safari 4b
CSS TEXT INDENT
Chrome 1


Safari 4b


Safari 4b


Opera 9


Opera 9
CSS BACKGROUND COLOR
 IE 6


 IE 7


IE 8b2


Opera 9


Opera 9
CSS BACKGROUND IMG
Firefox 2

Firefox 2

  IE 6

  IE 7

 IE 8b2

Opera 9

Opera 9
CSS & TEXTAREA
20




15




10




 5




 0
     IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                 Yes            No                Somewhat                  N/A
CSS & INPUT TEXT FIELDS
20




15




10




 5




 0
     IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                 Yes            No                Somewhat                  N/A
CSS & SUBMIT BUTTON
20




15




10




 5




 0
     IE6    IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                  Yes            No                Somewhat                  N/A
CSS & SELECT BOXES (ONE)
20




15




10




 5




 0
      IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                  Yes            No                Somewhat                  N/A
CSS & SELECT BOXES (MULTI)
20




15




10




 5




 0
     IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                 Yes            No                Somewhat                  N/A
CSS & FILE UPLOADS
20




15




10




 5




 0
     IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                 Yes            No                Somewhat                  N/A
CSS & CHECKBOXES
20




15




10




 5




 0
     IE6   IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                 Yes            No                Somewhat                  N/A
CSS & RADIO BUTTONS
20




15




10




 5




 0
     IE6    IE7     IE8b2   Ch   Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3   Win S3 Mac S4b Win S4b

                  Yes            No                Somewhat                  N/A
Radio    Check     File     Select   Select   Input   Text
Buttons   Boxes   Uploads   (Multi)   (One)     Text   Area
CSS PROPERTIES
100




 75




 50




 25




  0
      height   letter-spacing   line-height   margin       padding   text-align text-decoration text-indent   width   word-spacing


                          Y                            N                     S                          N/A
CSS PROPERTIES
100




 75




 50




 25




  0
      bkgd-color   bkgd-image   border   border-color border-style border-width   color   font-family   font-size   font-weight


                           Y                      N                         S                     N/A
Text Indent    Font Family     Height       Font Size       Margin

  Text        Border Color     Color       Border Style    Background
Decoration                                                    Color
              Font Weight    Background   Letter Spacing
                               Image                         Width
              Word Spacing                   Padding
                               Border
Radio        Check        File        Select   Select          Input        Text
Buttons       Boxes      Uploads      (Multi)   (One)            Text        Area



Text Indent      Font Family         Height       Font Size              Margin

  Text           Border Color        Color       Border Style           Background
Decoration                                                                 Color
                 Font Weight       Background   Letter Spacing
                                     Image                                Width
                Word Spacing                       Padding
                                     Border
MacFF3
              MacS4b                                      WinOp9
WinS3                      IE7         IE6      Chrome                     WinS4b
              WinFF3                                          IE8b2
MacS3



 Radio        Check        File        Select   Select          Input        Text
Buttons       Boxes      Uploads      (Multi)   (One)            Text        Area



Text Indent      Font Family         Height       Font Size              Margin

  Text           Border Color        Color       Border Style           Background
Decoration                                                                 Color
                 Font Weight       Background   Letter Spacing
                                     Image                                Width
                Word Spacing                       Padding
                                     Border
LET BROWSER VENDORS
             KNOW WHAT YOU WANT
•   Internet Explorer

    •   http://blogs.msdn.com/ie/contact.aspx

•   Opera

    •   http://my.opera.com/community/forums/forum.dml?id=24

    •   http://groups.google.com/group/opera.wishlist/topics

•   Safari

    •   http://lists.webkit.org/mailman/listinfo/webkit-dev

•   Google Chrome

    •   http://groups.google.com/group/chromium-dev
LET BROWSER VENDORS
        KNOW WHAT YOU WANT
•   Web Form Elements Design Quiz

    •   Part 1: http://tr.im/lp2k

    •   Part 2: http://tr.im/lp2g

•   http://www.WebFormElements.com/

    •   3,500 form element screen captures

•   HTML form element look-up tables (free):

    •   http://oreilly.com/catalog/9780596527419/appendixd/appd.pdf
HOW TO DESIGN FOR
SERIOUSLY MESSY FORMS
SURRENDER
ZERO OUT CSS PROPERTIES

• Zero    out Borders

• Zero    out Padding

• Zero    Margins

• Clear   out Background Images, Color, etc.

• Then

  • wrap    INPUT element with DIVs and bring in the control
SLOW WAY TO ZERO


<input type="submit" value="submit" class="submit" />
FASTER WAY TO ZERO
   input { /* type selector */
     border: 1px solid black;
   }
   .submit { /* class selector */
     border: 1px solid black;
   }
FASTER WAY TO ZERO
 input[type="text"] {
   border: 1px solid #177F75;
   font-family:Verdana, Arial, Helvetica, sans-serif;
 }
 input[type="submit"] {
   margin-left: 201px;
   background-color: #00CC00;
 }
 input[type="text"], select {
   display: block;
   float: left;
   margin-bottom: 7px;
 }
FASTER WAY TO ZERO


label[for="byear"], label[for="bdate"] {
  position: absolute;
  left: -999px;
  width: 990px;
}
DROP SHADOWS,
ROUNDED CORNERS,
    OH MY!
BASIC FORM
<form id="webmailForm" action="/-/">
<fieldset>
 <label for="email">Email</label>
 <input id="email" type="text" value="a.graham@example.com" />
</fieldset>
<fieldset>
 <label for="message">Message</label>
 <textarea id="comment">Mr. Watson -- come here.</textarea>
</fieldset>
</form>
BASIC FORM
<form id="webmailForm" action="/-/">
<fieldset>
 <label for="email">Email</label>
 <input id="email" type="text" value="a.graham@example.com" />
</fieldset>
<fieldset>
 <label for="message">Message</label>
 <textarea id="comment">Mr. Watson -- come here.</textarea>
</fieldset>
</form>
BASIC FORM
#webmailForm fieldset {

 margin: 0 0 15px 0;

 border: 0;
}
#webmailForm fieldset label {

 display: block;

 margin: 0 0 5px 0;

 font-weight: bold;
}
COOL FORM

#webmailForm fieldset input,
#webmailForm fieldset textarea {

 width: 550px;

 padding: 10px;

 font-size: 1.2em;

 border: none; /* zero out */

 background: #fcf;
 }
COOL FORM

#webmailForm fieldset input,
#webmailForm fieldset textarea {

 width: 550px;

 padding: 10px;

 font-size: 1.2em;

 border: none; /* zero out */

 background: #fcf;

 background-image: url(form-bkgd2.png);

 background-repeat: repeat-x;
 }
COOL FORM
#webmailForm fieldset input,
#webmailForm fieldset textarea {

 width: 550px;

 padding: 10px;

 font-size: 1.2em;

 border: none; /* zero out */

 background: #fcf;

 background-image: url(form-bkgd2.png);

 background-repeat: repeat-x;

 border-bottom: 1px solid #fff;

 border-right: 1px solid #fff;
 }
COOL FORM
#webmailForm fieldset input,
#webmailForm fieldset textarea {

 width: 550px;

 padding: 10px;

 font-size: 1.2em;

 border: none; /* zero out */

 background: #fcf;

 background-image: url(form-bkgd2.png);

 background-repeat: repeat-x;

 border-bottom: 1px solid #fff;

 border-right: 1px solid #fff;

 border-radius: 7px;

 -webkit-border-radius: 7px;

 -moz-border-radius: 7px;
 }
OTHER CSS3 PROPERTIES
ENABLED & DISABLED
  FORM ELEMENTS

<div>Enabled:<br />
<input name="enabled" type="text" value="Hello,
world!" />
</div>

<div>Disabled:<br />
<input name="disabled" type="text" value="Hello,
world!" disabled="disabled" />
</div>
ENABLED & DISABLED
  FORM ELEMENTS
ENABLED & DISABLED
  FORM ELEMENTS


input[type="text"]:disabled{
  opacity: .7;
  filter: alpha(opacity=70); /* cough */
}
ENABLED & DISABLED
  FORM ELEMENTS


input[type="text"]:disabled:after {
  content: "(disabled - do not use)";
  font-size: .9em;
  color: #CCCCCC;
  display: block;
}
ENABLED & DISABLED
  FORM ELEMENTS
ENABLED & DISABLED
  FORM ELEMENTS

   option:enabled{
     color: #9F393F;
   }

   input:enabled{
     background: #21B6A8;
     color:#9F393F;
   }
ENABLED & DISABLED
  FORM ELEMENTS
CHECKED RADIO
FORM ELEMENTS


input[type="radio"]:checked{
  background: #9F393F;
}
CHECKED RADIO
FORM ELEMENTS
THAT’S IT...
TAKE AWAYS

• Designing   for forms is hard for HTML+CSS

• Even the same browser, different platform render Web forms
 differently

• To
   help you discern the safety of CSS on a Web form, use
 WebFormElements.com

• Reviewed    which browsers are most hazardous
TAKE AWAYS

• Reviewed     which CSS properties are supported the most.

• Reviewed     what high-profile sites are doing to design for forms:
 Nothing.

• Call   to action!

  • Letbrowser vendors hear you or they won’t care to fix the
    problem.

  • With    HTML5 form elements, problem is going to get worse.
...AND STOP ADAPTING.
THANK YOU!
  Christopher Schmitt
schmitt@heatvision.com
  @teleject on twitter
CREATIVE COMMONS CITATIONS
   http://www.flickr.com/photos/lanuiop/2234239588/
 http://www.flickr.com/photos/gaetanlee/1947424580/
    http://www.flickr.com/photos/evapro/312900784/
     http://www.flickr.com/photos/kekka/799060449/
http://www.flickr.com/photos/hiddedevries/2594048276/
  http://www.flickr.com/photos/tomsaint/2992217972/

Más contenido relacionado

Similar a The CSS Summit: CSS & Form Elements

Similar a The CSS Summit: CSS & Form Elements (20)

Web Form Elements
Web Form ElementsWeb Form Elements
Web Form Elements
 
[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover
 
Type is Beautiful
Type is BeautifulType is Beautiful
Type is Beautiful
 
CSS3 3D Workshop
CSS3 3D WorkshopCSS3 3D Workshop
CSS3 3D Workshop
 
Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)
 
(Web ) Typography
(Web ) Typography(Web ) Typography
(Web ) Typography
 
[WebVisions 2010] CSS3 Workshop (Afternoon)
[WebVisions 2010] CSS3 Workshop (Afternoon)[WebVisions 2010] CSS3 Workshop (Afternoon)
[WebVisions 2010] CSS3 Workshop (Afternoon)
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Css3 101
Css3 101Css3 101
Css3 101
 
CSS tutorial chapter 2
CSS tutorial chapter 2CSS tutorial chapter 2
CSS tutorial chapter 2
 
The State of Web Type
The State of Web TypeThe State of Web Type
The State of Web Type
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?
 
01 Introduction To CSS
01 Introduction To CSS01 Introduction To CSS
01 Introduction To CSS
 
New Web Typography
New Web TypographyNew Web Typography
New Web Typography
 
Omeka css
Omeka cssOmeka css
Omeka css
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hours
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
The Trouble With Type
The Trouble With TypeThe Trouble With Type
The Trouble With Type
 
2h landing page
2h landing page 2h landing page
2h landing page
 
CSS 3
CSS 3CSS 3
CSS 3
 

Más de Christopher Schmitt

Keeping Colors from Killing Your Product
Keeping Colors from Killing Your ProductKeeping Colors from Killing Your Product
Keeping Colors from Killing Your ProductChristopher Schmitt
 
[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014Christopher Schmitt
 
[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't CodeChristopher Schmitt
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web DesignChristopher Schmitt
 
[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
GitHub for People Who Don't Code
GitHub for People Who Don't CodeGitHub for People Who Don't Code
GitHub for People Who Don't CodeChristopher Schmitt
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGsChristopher Schmitt
 

Más de Christopher Schmitt (20)

Keeping Colors from Killing Your Product
Keeping Colors from Killing Your ProductKeeping Colors from Killing Your Product
Keeping Colors from Killing Your Product
 
[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design
 
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
 
[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014
 
[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design
 
[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
 
[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design
 
GitHub for People Who Don't Code
GitHub for People Who Don't CodeGitHub for People Who Don't Code
GitHub for People Who Don't Code
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
 
[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs
 
[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3
 

Último

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Último (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

The CSS Summit: CSS & Form Elements

  • 1. CSS & WEB FORM ELEMENTS Christopher Schmitt | http://twitter.com/teleject
  • 2.
  • 3.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. ( )= / ( )
  • 10.
  • 11.
  • 12. FORM ELEMENTS • Checkboxes • Select: • Input: • Multiple Items • File • Single Item • Radio • Submit Button • Text • Textarea
  • 13. CSS PROPERTIES • background-color • height • background-image • letter-spacing • border • line-height • border-color • margin • border-style • padding • border-width • text-align • color • text-decoration • font-family • text-indent • font-size • width • font-weight • word-spacing
  • 14. 7.2 5 8.5 1.5 3 1 5.5 9 2.0 4b 6 3.0 7 8b2 7.2 9 1.5 2 2.0 3 3.0 4b
  • 16.
  • 17.
  • 18.
  • 19.
  • 21. CSS HEIGHT FF 2 FF 2 FF 3 Chrome 1
  • 22. CSS WIDTH FF 3 FF 3 Safari 3 Safari 3 Safari 4b Safari 4b
  • 23. CSS TEXT INDENT Chrome 1 Safari 4b Safari 4b Opera 9 Opera 9
  • 24. CSS BACKGROUND COLOR IE 6 IE 7 IE 8b2 Opera 9 Opera 9
  • 25. CSS BACKGROUND IMG Firefox 2 Firefox 2 IE 6 IE 7 IE 8b2 Opera 9 Opera 9
  • 26.
  • 27. CSS & TEXTAREA 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 28. CSS & INPUT TEXT FIELDS 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 29. CSS & SUBMIT BUTTON 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 30. CSS & SELECT BOXES (ONE) 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 31. CSS & SELECT BOXES (MULTI) 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 32. CSS & FILE UPLOADS 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 33. CSS & CHECKBOXES 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 34. CSS & RADIO BUTTONS 20 15 10 5 0 IE6 IE7 IE8b2 Ch Mac FF3 Win FF3 Mac Op9 Win Op9 Mac S3 Win S3 Mac S4b Win S4b Yes No Somewhat N/A
  • 35. Radio Check File Select Select Input Text Buttons Boxes Uploads (Multi) (One) Text Area
  • 36.
  • 37. CSS PROPERTIES 100 75 50 25 0 height letter-spacing line-height margin padding text-align text-decoration text-indent width word-spacing Y N S N/A
  • 38. CSS PROPERTIES 100 75 50 25 0 bkgd-color bkgd-image border border-color border-style border-width color font-family font-size font-weight Y N S N/A
  • 39. Text Indent Font Family Height Font Size Margin Text Border Color Color Border Style Background Decoration Color Font Weight Background Letter Spacing Image Width Word Spacing Padding Border
  • 40. Radio Check File Select Select Input Text Buttons Boxes Uploads (Multi) (One) Text Area Text Indent Font Family Height Font Size Margin Text Border Color Color Border Style Background Decoration Color Font Weight Background Letter Spacing Image Width Word Spacing Padding Border
  • 41. MacFF3 MacS4b WinOp9 WinS3 IE7 IE6 Chrome WinS4b WinFF3 IE8b2 MacS3 Radio Check File Select Select Input Text Buttons Boxes Uploads (Multi) (One) Text Area Text Indent Font Family Height Font Size Margin Text Border Color Color Border Style Background Decoration Color Font Weight Background Letter Spacing Image Width Word Spacing Padding Border
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. LET BROWSER VENDORS KNOW WHAT YOU WANT • Internet Explorer • http://blogs.msdn.com/ie/contact.aspx • Opera • http://my.opera.com/community/forums/forum.dml?id=24 • http://groups.google.com/group/opera.wishlist/topics • Safari • http://lists.webkit.org/mailman/listinfo/webkit-dev • Google Chrome • http://groups.google.com/group/chromium-dev
  • 50. LET BROWSER VENDORS KNOW WHAT YOU WANT • Web Form Elements Design Quiz • Part 1: http://tr.im/lp2k • Part 2: http://tr.im/lp2g • http://www.WebFormElements.com/ • 3,500 form element screen captures • HTML form element look-up tables (free): • http://oreilly.com/catalog/9780596527419/appendixd/appd.pdf
  • 51.
  • 52. HOW TO DESIGN FOR SERIOUSLY MESSY FORMS
  • 54.
  • 55. ZERO OUT CSS PROPERTIES • Zero out Borders • Zero out Padding • Zero Margins • Clear out Background Images, Color, etc. • Then • wrap INPUT element with DIVs and bring in the control
  • 56.
  • 57. SLOW WAY TO ZERO <input type="submit" value="submit" class="submit" />
  • 58. FASTER WAY TO ZERO input { /* type selector */ border: 1px solid black; } .submit { /* class selector */ border: 1px solid black; }
  • 59. FASTER WAY TO ZERO input[type="text"] { border: 1px solid #177F75; font-family:Verdana, Arial, Helvetica, sans-serif; } input[type="submit"] { margin-left: 201px; background-color: #00CC00; } input[type="text"], select { display: block; float: left; margin-bottom: 7px; }
  • 60. FASTER WAY TO ZERO label[for="byear"], label[for="bdate"] { position: absolute; left: -999px; width: 990px; }
  • 62. BASIC FORM <form id="webmailForm" action="/-/"> <fieldset> <label for="email">Email</label> <input id="email" type="text" value="a.graham@example.com" /> </fieldset> <fieldset> <label for="message">Message</label> <textarea id="comment">Mr. Watson -- come here.</textarea> </fieldset> </form>
  • 63.
  • 64. BASIC FORM <form id="webmailForm" action="/-/"> <fieldset> <label for="email">Email</label> <input id="email" type="text" value="a.graham@example.com" /> </fieldset> <fieldset> <label for="message">Message</label> <textarea id="comment">Mr. Watson -- come here.</textarea> </fieldset> </form>
  • 65.
  • 66. BASIC FORM #webmailForm fieldset { margin: 0 0 15px 0; border: 0; } #webmailForm fieldset label { display: block; margin: 0 0 5px 0; font-weight: bold; }
  • 67.
  • 68. COOL FORM #webmailForm fieldset input, #webmailForm fieldset textarea { width: 550px; padding: 10px; font-size: 1.2em; border: none; /* zero out */ background: #fcf; }
  • 69.
  • 70. COOL FORM #webmailForm fieldset input, #webmailForm fieldset textarea { width: 550px; padding: 10px; font-size: 1.2em; border: none; /* zero out */ background: #fcf; background-image: url(form-bkgd2.png); background-repeat: repeat-x; }
  • 71.
  • 72. COOL FORM #webmailForm fieldset input, #webmailForm fieldset textarea { width: 550px; padding: 10px; font-size: 1.2em; border: none; /* zero out */ background: #fcf; background-image: url(form-bkgd2.png); background-repeat: repeat-x; border-bottom: 1px solid #fff; border-right: 1px solid #fff; }
  • 73.
  • 74. COOL FORM #webmailForm fieldset input, #webmailForm fieldset textarea { width: 550px; padding: 10px; font-size: 1.2em; border: none; /* zero out */ background: #fcf; background-image: url(form-bkgd2.png); background-repeat: repeat-x; border-bottom: 1px solid #fff; border-right: 1px solid #fff; border-radius: 7px; -webkit-border-radius: 7px; -moz-border-radius: 7px; }
  • 75.
  • 77. ENABLED & DISABLED FORM ELEMENTS <div>Enabled:<br /> <input name="enabled" type="text" value="Hello, world!" /> </div> <div>Disabled:<br /> <input name="disabled" type="text" value="Hello, world!" disabled="disabled" /> </div>
  • 78. ENABLED & DISABLED FORM ELEMENTS
  • 79. ENABLED & DISABLED FORM ELEMENTS input[type="text"]:disabled{ opacity: .7; filter: alpha(opacity=70); /* cough */ }
  • 80. ENABLED & DISABLED FORM ELEMENTS input[type="text"]:disabled:after { content: "(disabled - do not use)"; font-size: .9em; color: #CCCCCC; display: block; }
  • 81. ENABLED & DISABLED FORM ELEMENTS
  • 82. ENABLED & DISABLED FORM ELEMENTS option:enabled{ color: #9F393F; } input:enabled{ background: #21B6A8; color:#9F393F; }
  • 83. ENABLED & DISABLED FORM ELEMENTS
  • 87. TAKE AWAYS • Designing for forms is hard for HTML+CSS • Even the same browser, different platform render Web forms differently • To help you discern the safety of CSS on a Web form, use WebFormElements.com • Reviewed which browsers are most hazardous
  • 88. TAKE AWAYS • Reviewed which CSS properties are supported the most. • Reviewed what high-profile sites are doing to design for forms: Nothing. • Call to action! • Letbrowser vendors hear you or they won’t care to fix the problem. • With HTML5 form elements, problem is going to get worse.
  • 90. THANK YOU! Christopher Schmitt schmitt@heatvision.com @teleject on twitter
  • 91. CREATIVE COMMONS CITATIONS http://www.flickr.com/photos/lanuiop/2234239588/ http://www.flickr.com/photos/gaetanlee/1947424580/ http://www.flickr.com/photos/evapro/312900784/ http://www.flickr.com/photos/kekka/799060449/ http://www.flickr.com/photos/hiddedevries/2594048276/ http://www.flickr.com/photos/tomsaint/2992217972/