SlideShare uma empresa Scribd logo
1 de 91
Baixar para ler offline
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/

Mais conteúdo relacionado

Semelhante a The CSS Summit: CSS & Form Elements

Semelhante 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
 

Mais 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
 

Mais 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

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Último (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

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/