<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Formal Weirdness</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Fri, 19 Mar 2010 00:27:46 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Safari and Chrome css form issues</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-474881</link>
		<dc:creator>Safari and Chrome css form issues</dc:creator>
		<pubDate>Fri, 28 Aug 2009 16:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-474881</guid>
		<description>[...] very simple, really: style form controls at your own peril! ;) Read this article: Formal Weirdness.  My advice would be not to style the controls at [...]</description>
		<content:encoded><![CDATA[<p>[...] very simple, really: style form controls at your own peril! ;) Read this article: Formal Weirdness.  My advice would be not to style the controls at [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Image positioning in IE and FF</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-472852</link>
		<dc:creator>Image positioning in IE and FF</dc:creator>
		<pubDate>Wed, 05 Aug 2009 21:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-472852</guid>
		<description>[...] Originally Posted by CloudedVision   I do that all the time, and nothing bad happens to any of my submit buttons     The effects aren&#039;t the same in all browsers. Also, I think submit buttons are one of the less noticeably affected elements.  Eric Meyer explains the issue in formal weirdness. [...]</description>
		<content:encoded><![CDATA[<p>[...] Originally Posted by CloudedVision   I do that all the time, and nothing bad happens to any of my submit buttons     The effects aren&#8217;t the same in all browsers. Also, I think submit buttons are one of the less noticeably affected elements.  Eric Meyer explains the issue in formal weirdness. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wheresrhys &#187; Blog Archive &#187; In defence of jQuery browser detection</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-462874</link>
		<dc:creator>wheresrhys &#187; Blog Archive &#187; In defence of jQuery browser detection</dc:creator>
		<pubDate>Sat, 23 May 2009 12:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-462874</guid>
		<description>[...] would be the obvious way to do this. No matter how many CSS bugs get fixed in browsers, how to render form elements by default isn&#8217;t specified by CSS/html, so there will always be this reason to want to detect [...]</description>
		<content:encoded><![CDATA[<p>[...] would be the obvious way to do this. No matter how many CSS bugs get fixed in browsers, how to render form elements by default isn&#8217;t specified by CSS/html, so there will always be this reason to want to detect [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Focus on Forms &#171; Rachael L. Moore, Web Designer - Tallahassee, Florida</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-462417</link>
		<dc:creator>Focus on Forms &#171; Rachael L. Moore, Web Designer - Tallahassee, Florida</dc:creator>
		<pubDate>Tue, 19 May 2009 13:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-462417</guid>
		<description>[...] http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/" rel="nofollow">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adding classes to input tags as a matter of course &#124; Css Templates - 1000s of Free, Premium CSS Templates</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-440881</link>
		<dc:creator>Adding classes to input tags as a matter of course &#124; Css Templates - 1000s of Free, Premium CSS Templates</dc:creator>
		<pubDate>Thu, 05 Feb 2009 22:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-440881</guid>
		<description>[...] Eric Meyer&#8217;s Formal Wierdness [...]</description>
		<content:encoded><![CDATA[<p>[...] Eric Meyer&#8217;s Formal Wierdness [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MyCashflow blogi &#8211; Asiaa MyCashflow'sta, Interface-rajapinnasta ja verkkokauppabisneksestä yleisesti.</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-350538</link>
		<dc:creator>MyCashflow blogi &#8211; Asiaa MyCashflow'sta, Interface-rajapinnasta ja verkkokauppabisneksestä yleisesti.</dc:creator>
		<pubDate>Mon, 07 Apr 2008 08:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-350538</guid>
		<description>[...] se, että ne ovat tiukasti sidottu joko suoraan käyttöjärjestelmään tai selaimeen, jolloin lähtökohdat ja lopputulokset ovat monesti hyvinkin vaihtelevia. Tämä johtuu yksinkeraisesti vain siitä, että CSS2.1 [...]</description>
		<content:encoded><![CDATA[<p>[...] se, että ne ovat tiukasti sidottu joko suoraan käyttöjärjestelmään tai selaimeen, jolloin lähtökohdat ja lopputulokset ovat monesti hyvinkin vaihtelevia. Tämä johtuu yksinkeraisesti vain siitä, että CSS2.1 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fcicq's del.icio.us &#187; Blog Archive &#187; links for 2008-02-11</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-318286</link>
		<dc:creator>fcicq's del.icio.us &#187; Blog Archive &#187; links for 2008-02-11</dc:creator>
		<pubDate>Mon, 11 Feb 2008 09:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-318286</guid>
		<description>[...] Eric&quot;s Archived Thoughts: Formal Weirdness (tags: css webdesign forms) [...]</description>
		<content:encoded><![CDATA[<p>[...] Eric&#8221;s Archived Thoughts: Formal Weirdness (tags: css webdesign forms) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Templaterie Blog</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-290405</link>
		<dc:creator>Templaterie Blog</dc:creator>
		<pubDate>Sat, 29 Dec 2007 09:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-290405</guid>
		<description>[...] Einen mehr als Berechtigten Rant bez&#252;glich der Art und Weise wie Formulare in Browser integriert wurden, wie unflexible und inkongruent diese sich in den verschiedenen Browsern geben, schrieb Erich Meyer in einem lesenswerten Beitrag: Formal Weirdness. [...]</description>
		<content:encoded><![CDATA[<p>[...] Einen mehr als Berechtigten Rant bez&#252;glich der Art und Weise wie Formulare in Browser integriert wurden, wie unflexible und inkongruent diese sich in den verschiedenen Browsern geben, schrieb Erich Meyer in einem lesenswerten Beitrag: Formal Weirdness. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Space Ninja &#187; Blog Archive &#187; 41 Useful CSS Links</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-253832</link>
		<dc:creator>Space Ninja &#187; Blog Archive &#187; 41 Useful CSS Links</dc:creator>
		<pubDate>Tue, 30 Oct 2007 02:12:27 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-253832</guid>
		<description>[...] Eric Meyer explains, CSS and forms are unpredictable, for good reason. Still, there&#8217;s a lot you can do, and most of it starts with a good [...]</description>
		<content:encoded><![CDATA[<p>[...] Eric Meyer explains, CSS and forms are unpredictable, for good reason. Still, there&#8217;s a lot you can do, and most of it starts with a good [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianBal.com &#187; Blog Archive &#187; Styling Form Controls</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-251914</link>
		<dc:creator>BrianBal.com &#187; Blog Archive &#187; Styling Form Controls</dc:creator>
		<pubDate>Fri, 26 Oct 2007 18:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-251914</guid>
		<description>[...] because you cannot get consistent results across different browsers. In Eric Meyer&quot;s blog post Formal Weirdness he explains why form controls are impossible to describe with current [...]</description>
		<content:encoded><![CDATA[<p>[...] because you cannot get consistent results across different browsers. In Eric Meyer&#8221;s blog post Formal Weirdness he explains why form controls are impossible to describe with current [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianBal.com : Styling Form Controls</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-251005</link>
		<dc:creator>BrianBal.com : Styling Form Controls</dc:creator>
		<pubDate>Wed, 24 Oct 2007 23:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-251005</guid>
		<description>[...] you cannot get consistent results across different browsers. In Eric Meyer&#8217;s blog post Formal Weirdness he explains why form controls are impossible to describe with current [...]</description>
		<content:encoded><![CDATA[<p>[...] you cannot get consistent results across different browsers. In Eric Meyer&rsquo;s blog post Formal Weirdness he explains why form controls are impossible to describe with current [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tilgjengelige og brukervennlige webskjema - bza.no</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-248984</link>
		<dc:creator>Tilgjengelige og brukervennlige webskjema - bza.no</dc:creator>
		<pubDate>Sun, 21 Oct 2007 09:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-248984</guid>
		<description>[...] opp skjemaets utseende med CSS, men vær obmerksom på at dette kan motargumenteres. Sørg for at brukeren ser at skjemaet fortsatt er et skjema, og at ikke designbiten overstyrer [...]</description>
		<content:encoded><![CDATA[<p>[...] opp skjemaets utseende med CSS, men vær obmerksom på at dette kan motargumenteres. Sørg for at brukeren ser at skjemaet fortsatt er et skjema, og at ikke designbiten overstyrer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CSS reset and the universal selector (*) &#171; joe gornick</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-246772</link>
		<dc:creator>CSS reset and the universal selector (*) &#171; joe gornick</dc:creator>
		<pubDate>Wed, 17 Oct 2007 15:01:42 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-246772</guid>
		<description>[...] to reset the margin and padding of all elements.  I must admit, I did the same thing until I read Eric Meyer&#8217;s artilce on Formal Weirdness.  Eric&#8217;s article explains why you don&#8217;t want to reset every element on the page, [...]</description>
		<content:encoded><![CDATA[<p>[...] to reset the margin and padding of all elements.  I must admit, I did the same thing until I read Eric Meyer&#8217;s artilce on Formal Weirdness.  Eric&#8217;s article explains why you don&#8217;t want to reset every element on the page, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-196319</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 05 Jul 2007 15:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-196319</guid>
		<description>I know that you didn&#039;t mean to &#039;pick on&#039; Safari for being different, but I can please suggest that in future you let Camino stand shoulder to shoulder with Safari in maintaining the correct user experience by using the form elements that the user expects to see?

Apart from that, very thought-provoking article.
Not quite sure that I understand why you insist that shadows and border-radius aren&#039;t &quot;current CSS&quot;?</description>
		<content:encoded><![CDATA[<p>I know that you didn&#8217;t mean to &#8216;pick on&#8217; Safari for being different, but I can please suggest that in future you let Camino stand shoulder to shoulder with Safari in maintaining the correct user experience by using the form elements that the user expects to see?</p>
<p>Apart from that, very thought-provoking article.<br />
Not quite sure that I understand why you insist that shadows and border-radius aren&#8217;t &#8220;current CSS&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-180461</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Tue, 19 Jun 2007 18:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comment-180461</guid>
		<description>No, I meant what I said.  &#039;border-radius&#039; doesn&#039;t count as &quot;current CSS&quot;, but instead as &quot;future CSS&quot;, and &#039;text-shadow&#039; may or may not be CSS, future or otherwise.

Examples 5 and 6 were the two I was thinking of, and as for #7, I may have misunderstood its point.  If it&#039;s supposed to have either a transparent or filled background all the time, then yes, that&#039;s doable.  If the two fields next to each other are supposed to represent the presentation of the text field out of focus and in focus, then CSS can&#039;t describe the disappearance of the text in the field when it acquires focus.  (Or loses it; I don&#039;t know which.)  So I maybe should have said &quot;two or three&quot; instead of just &quot;two&quot;.

My only question now is, did I miscount the seven as nine, or did the image change?  I&#039;m betting the former, but I&#039;d like to know for sure before I go editing the post.</description>
		<content:encoded><![CDATA[<p>No, I meant what I said.  &#8216;border-radius&#8217; doesn&#8217;t count as &#8220;current CSS&#8221;, but instead as &#8220;future CSS&#8221;, and &#8216;text-shadow&#8217; may or may not be CSS, future or otherwise.</p>
<p>Examples 5 and 6 were the two I was thinking of, and as for #7, I may have misunderstood its point.  If it&#8217;s supposed to have either a transparent or filled background all the time, then yes, that&#8217;s doable.  If the two fields next to each other are supposed to represent the presentation of the text field out of focus and in focus, then CSS can&#8217;t describe the disappearance of the text in the field when it acquires focus.  (Or loses it; I don&#8217;t know which.)  So I maybe should have said &#8220;two or three&#8221; instead of just &#8220;two&#8221;.</p>
<p>My only question now is, did I miscount the seven as nine, or did the image change?  I&#8217;m betting the former, but I&#8217;d like to know for sure before I go editing the post.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head profile="http://gmpg.org/xfn/1">
<title>meyerweb.com</title>
<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://emeyer.myopenid.com/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="shortcut icon" href="/favicon.ico"><link rel="home" href="http://meyerweb.com/" title="Home" ><link rel="stylesheet" href="http://meyerweb.com/ui/meyerweb.css" type="text/css" media="screen, projection"><link rel="stylesheet" href="http://meyerweb.com/ui/theme.css" type="text/css" media="screen, projection" id="themeLink"><link rel="stylesheet" href="http://meyerweb.com/ui/print.css" type="text/css" media="print"><script src="http://meyerweb.com/ui/addresses.js" type="text/javascript"></script><link rel="stylesheet" href="/ui/wordpress.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/tfe.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/home.css" type="text/css" media="screen">
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric" href="/eric/thoughts/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only technical posts)" href="/eric/thoughts/category/tech/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only personal posts)" href="/eric/thoughts/category/personal/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Distractions" href="/eric/thoughts/recent-links/rss2" />
<link rel="alternate" type="application/rss+xml" title="Excuse of the Day" href="/feeds/excuse/rss20.xml" />
</head>
<body id="www-meyerweb-com" class="hpg">

<div id="sitemast"><h1><a href="/"><span>meyerweb</span>.com</a></h1></div><div id="search"><h4>Exploration</h4><!-- SiteSearch Google --><form method="get" action="http://www.google.com/custom" target="_top"><div><input type="hidden" name="domains" value="meyerweb.com"></input><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb"></input><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input><p><input type="radio" name="sitesearch" value="meyerweb.com" checked id="ss1"></input><label for="ss1" title="Search meyerweb.com">meyerweb.com</label><input type="radio" name="sitesearch" value="" id="ss0"></input><label for="ss0" title="Search the Web">Web</label></p><input type="hidden" name="client" value="pub-3772084027748653"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input><input type="hidden" name="hl" value="en"></input></div></form><!-- SiteSearch Google --><!-- <form method="get" action="http://www.google.com/custom"><div><input type="submit" name="sa" value="Search"><input type="text" name="q" size="20" maxlength="255" value=""><input type="hidden" name="sitesearch" value="meyerweb.com"></div></form><small><a href="http://www.google.com/search">Powered by Google</a></small> --></div><div id="main"><div class="skipper">Skip to: <a href="#extra">site navigation/presentation</a></div><div class="skipper">Skip to: <a href="#thoughts">Thoughts From Eric</a></div>
<div id="thoughts">


<div class="entry">
<h3><a href="http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/" rel="bookmark" title="Permanent Link: Formal Weirdness">Formal Weirdness</a></h3>
<ul class="meta">
<li class="date">Tue 15 May 2007</li>
<li class="time">2236</li>
<li class="cat"><a href="http://meyerweb.com/eric/thoughts/category/tech/css/" title="View all posts in CSS" rel="category tag">CSS</a></li>
<li class="cmt"><a href="http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/#comments">78 responses</a></li>
<li></li><li></li></ul>

<div class="text">
<p>
As I described and tweaked <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">my version of reset styling</a>, a fair number of people asked (with varying degrees of politeness) why I didn&#8217;t just use a universal selector instead of that big ugly grouped selector.  I said that I wanted to avoid styling form controls (inputs, textareas, and so on), and the only way to do that, given the state of selector support in today&#8217;s browsers, is to list all the elements I want to reset while leaving out those I don&#8217;t want to touch&#8212;like all the form controls.
</p>
<p>
This led to a fair number of questions as to why I&#8217;d bother avoiding form controls, and I said it was due to their &#8220;inherent weirdness&#8221;.  By this, I meant that form controls are impossible to describe with current CSS; and if they were treated the way CSS says they should be, we&#8217;d all hate the results.  Furthermore, the handling of form control styling is going to be a very unstable branch of our field for the foreseeable future.
</p>
<p>
Herein, I scratch the surface of this entire mess.  Fair warning up front: this is going to be a long one.  Also, as Bette Davis once proclaimed, buckle your seat belts: it&#8217;s going to be a bumpy ride.
</p>
<p>
Let&#8217;s start with a (seemingly) simple form element: a checkbox.  Here are two in Firefox, one checked and one unchecked.
</p>

<img src="http://meyerweb.com/pix/2007/forms-checkbox-ff-01.png" alt="" class="standalone" />

<p>
All right, now here&#8217;s a question: what should happen if I assign these checkboxes <code>padding: 10px;</code>?  Take a moment and think through the details.
</p>
<p>
&#8220;That&#8217;s an easy one,&#8221; you may say.  &#8220;There&#8217;s 10 pixels of padding between the checkmark and the borders of the box.&#8221;  And maybe you&#8217;re right.  But let&#8217;s consider the same question for these checkboxes from Safari.
</p>

<img src="http://meyerweb.com/pix/2007/forms-checkbox-sf-01.png" alt="" class="standalone" />

<p>
Notice how the checkmark hangs jauntily out of the box?  If we add padding, does the checkmark become contained within the box&#8212;in other words, does the checkmark stay the same size while the box visually expands&#8212;or does it stretch in size so that it&#8217;s still sticking out of the box?  You don&#8217;t even have to think about what to do with the drop shadow or the glassy beveled highlight effect; just worry about what to do with the checkmark.  Again, take a few moments to think through all the implications.
</p>
<p>
All right, you should have an answer by now.  Bully!  The sad truth is that no matter what you&#8217;ve decided, you&#8217;re wrong.  Okay, I admit that&#8217;s unnecessarily harsh:  more properly, you aren&#8217;t right.  You can&#8217;t be, because there are no defined answers to these questions.
</p>
<p>
Thus, if a browser lets you style a form element, it&#8217;s doing so blindly, from a specification-compliance point of view.  The people who wrote that browser code were guessing.  No doubt they were intelligent guesses, but they&#8217;re guesses all the same.
</p>
<p>
So why not just define the answers?  That turns out to be a good deal trickier than we might hope.  Take checkboxes (please!).  They&#8217;re replaced elements, right?  You have an <code>input</code> element that ends up placing a symbol, in much the same way an <code>img</code> element places an image file.  The symbol changes based on whether the checkbox has been checked or not, something like a JavaScript-driven image-swap.  The appearance of the checkbox isn&#8217;t defined in any way, so browsers are free to do whatever they want, as we saw above.
</p>
<p>
That means that the &#8220;interior&#8221; of this kind of <code>input</code> element&#8212;the checkbox (filled or not)&#8212;is a black box from a CSS point of view.  There&#8217;s nothing in the document structure or content that represents the actual checkmark, for example.  You can&#8217;t in good conscience define the checkmark as content and the checkbox as the element that surrounds it.  So should padding apply at all?  Maybe.
</p>
<p>
But if it does, and the checkbox is a replaced element, then defining a background color and padding for the checkbox would put the defined background color <em>around</em> the symbol&#8212;the <em>whole</em> symbol, checkmark and checkbox and all&#8212;instead of inside the checkbox.  That&#8217;s a completely reasonable conclusion given the assumption that the checkbox symbol is replaced.  It&#8217;s just completely <em>un</em>reasonable if you&#8217;re a visual type and you want that checkbox to be filled in with red, for the love of Bob!
</p>
<p>
So: is a checkbox a combination of an element box surrounding content, or a completely replaced element?  Which padding-and-background effect should take hold?
</p>

<img src="http://meyerweb.com/pix/2007/forms-checkbox-hyp-01.png" alt="" class="standalone" />

<p>
Just to muddy the waters a bit further, consider the following:
</p>
<ul>
<li>What happens to the checkmark when the input is italicized, either directly or by inheritance?  How about when it&#8217;s boldfaced?  (Assume the checkmark comes from a font family that has italic and boldfaced versions of the checkmark available.)  What, if anything, should happen to the checkbox under either condition?</li>
<li>If <code>text-decoration: underline</code> is applied to the checkbox, should the whole box be underlined, or just the checkmark?  Does your answer change when you consider the effects of padding?</li>
<li>Should <code>vertical-align</code> apply to the checkmark, or to the checkbox as a whole in relation to the line of text in which it sits?</li>
<li>What effect should <code>line-height</code> have on the checkbox and its contents?  For example, what should happen if you say <code>input[type="checkbox"] {line-height: 3em;}</code>?  Don&#8217;t forget that the most common way for an element to experience altered line height is by inheritance.</li>
<li>Should <code>height</code> and <code>width</code> be honored on a checkbox?  If so, should they apply to the whole box, or to the &#8220;content&#8221; (the checkmark)?  If the former, what should happen to the checkmark as a result&#8211;should it stay the same size and be aligned in some way, or should its size scale along with the checkbox?</li>
</ul>

<p>
In my experience, the most common answers to these questions tend to be contradictory&#8212;some implying a box-and-content model, others implying a replaced model.  I mean, just look at the poser buried in the middle of that last point.  What does <code>width</code> even mean when it comes to a form control?  Is it just the content, like with non-replaced elements; or is it the whole element box, borders and all, like in replaced elements?
</p>
<p>
As far as <a href="http://www.w3.org/TR/2006/WD-CSS21-20061106/">the latest draft of CSS 2.1</a> is concerned, all <code>input</code>s (really, all form controls) are replaced, the same as images.  So no background inside the checkbox; no change due to italics or boldfacing or line heights; <code>vertical-align</code> shifting the box as a whole; and <code>height</code> and <code>width</code> applying to the entire box.
</p>
<p>
You might feel that&#8217;s acceptable, overall, but remember that I said CSS 2.1 regards <em>all</em> form controls as replaced.  So all that would be just as true for text inputs and textareas as it is for checkboxes.  That&#8217;s probably not acceptable to most people.  For example, that would mean that <code>vertical-align: baseline</code> would put a text input&#8217;s bottom edge on the baseline of the text that surrounds it, instead of aligning the text inside the input with the text around it.  Almost everyone prefers the second to the first, and most browsers conform to that preference, but that&#8217;s not what should happen.  In fact, when it comes to form controls, nearly all known browsers ignore the specification&#8217;s assertion that form controls are replaced elements.
</p>
<p>
And we haven&#8217;t even touched the hard cases, like select boxes.  Here&#8217;s one from Firefox in the &#8220;closed&#8221; and &#8220;open&#8221; states.
</p>

<img src="http://meyerweb.com/pix/2007/forms-select-ff-01.png" alt="" class="standalone" />

<p>
Let&#8217;s jump straight to the obvious puzzler: what should happen if you declare <code>select {padding: 10px;}</code>?  Here are three different possibilities for just the closed select.
</p>

<img src="http://meyerweb.com/pix/2007/forms-select-hyp-01.png" alt="" class="standalone" />

<p>
Go ahead, pick your favorite.  Got it?  Now, should the same thing happen when the select is &#8220;open&#8221;, showing all the options?  For that matter, should the same thing happen given this select box from Safari?
</p>

<img src="http://meyerweb.com/pix/2007/forms-select-sf-01.png" alt="" class="standalone" />

<p>
It does no good to say that your choice would be <em>just fine</em> if Safari would only just go along with everyone else.  There is no pre-defined appearance for select boxes, or for any other form control.  In Safari&#8217;s case, it&#8217;s pulling these things right out of OS X and placing them in the document&#8212;the very definition of replaced-element behavior.  (And yet, browsers keep treating them as if they&#8217;re non-replaced.)  Explorer does the same thing, actually, and is the reason why form controls seemed to have infinite <code>z-index</code> in IE6 and earlier&#8212;they were drawn by the OS after everything else on the document had been laid out.  Firefox, on the other hand, draws its own form controls, which is why they&#8217;re more consistent across operating systems, but also don&#8217;t suffer from draw-order issues like Explorer did.  (It&#8217;s also part of the reason Firefox takes longer to launch on many systems; rather than making use of the OS for things like form controls, it has to carry its own around with it.)
</p>
<p>
We could get into a very long discussion about whether form elements should always reflect the operating system or not, which usually breaks down to HCI advocates on one side of the debate and designers on the other.  Let&#8217;s not, though (at least not here).  Let&#8217;s just assume that form controls should be styleable, because that brings us right back to the central dilemma: how, exactly?
</p>
<p>
After all, we can make the previous select box riddle even more interesting.  Suppose you declare this:
</p>

<pre>
select {padding: 10px;}
option {padding: 10px;}
</pre>

<p>
Now what?  After all, there&#8217;s an <code>option</code> element visible there in the select box from the moment it&#8217;s drawn&#8212;or is it?  Maybe that&#8217;s a special feature of a <code>select</code> element that copies content from an <code>option</code> element to display when no <code>option</code> elements are visible.  <em>We don&#8217;t know.</em>  But let&#8217;s assume that what we see there is an <code>option</code> element visible inside the <code>select</code> element.  It&#8217;ll be either the first one in the list, or the one with a proper <code>selected</code> attribute.  Hey, what about this rule set?
</p>

<pre>
select {padding: 10px;}
option {padding: 10px; border-bottom: 1px solid gray;}
option[selected] {font-style: italic; background: yellow;}
</pre>

<p>
Yee <em>haw</em>!  There are a ton of questions I could pose here, but I&#8217;ll go with one of the trickier ones: should the gray <code>option</code> bottom border be visible inside the select box when the select is &#8220;closed&#8221;, or should it only appear on <code>option</code> elements when the select is &#8220;open&#8221;?  Oh, and here&#8217;s another good one: does the padding on the <code>select</code> element apply to the drop-down menu made up of <code>option</code> elements, or no?
</p>
<p>
The beauty is that whichever answers are perfectly obvious to you, it&#8217;s perfectly obvious to someone else that your answers are completely wrong.  And vice versa.
</p>
<p>
And remember, these are some of the simpler cases.  When you start considering things like how to style radio buttons and file inputs, things get <em>really</em> hairy.  I mean, just look at the differences between Safari and Firefox.
</p>

<img src="http://meyerweb.com/pix/2007/forms-radio-file-01.png" alt="" class="standalone" />

<p>
Merely sticking to questions of padding and background colors is vexing enough.  Start throwing in text/font styling, borders, and even foreground colors; they quickly generate a cornucopia of complex control condundra.  <strong>The pain!</strong>
</p>
<p>
And don&#8217;t think the entire issue of styling form controls is going to get any easier; in fact, the Safari team is about to make it a good deal harder.  If you read their post &#8220;<a href="http://webkit.org/blog/51/text-fields/">Text Fields</a>&#8220;, you&#8217;ll see that Safari will soon make it possible to do all kinds of stuff to text inputs.  (If you&#8217;re downloading nightly builds of Safari, it already allows these.)  Of the nine example images, only two have any hope of being described using current CSS&#8212;and even those have to dodge questions like exactly how a text input should be baseline-aligned (as mentioned earlier).
</p>
<p>
So in order to style form controls in any sort of meaningful way, it will be necessary to invent a whole bunch of new properties and pseudo-classes (and most likely pseudo-elements) and describe how they behave and interact.  That&#8217;s much more easily said than done.  It&#8217;s taken more than five years to not finish CSS 2.1, and that&#8217;s just a reduced and clarified version of CSS 2.  Just imagine how much longer it could take to not finish inventing a whole new branch of CSS.
</p>
<p>
Not that anyone&#8217;s really working on it right now.  The closest we have is the <a href="http://www.w3.org/TR/css3-ui/">Basic User Interface Module</a>, which became a Candidate Recommendation on 11 May 2004 (yes, <em>three years</em> ago) and has not moved since.  There is no other form controls module.  There are things that could apply in a variety of other modules (like &#8220;<a href="http://www.w3.org/TR/css3-box/">The box model</a>&#8220;, &#8220;<a href="http://www.w3.org/TR/css3-content/">Generated and replaced elements</a>&#8220;, and &#8220;<a href="http://www.w3.org/TR/css3-linebox/">line</a>&#8220;), but none of them are explicitly about form controls and so their relevance is at best debatable.
</p>
<p>
In that vacuum, browsers are acting to different degrees.  As we saw earlier, Safari is pushing forward in a major way.  Explorer allows some form control styling, but not much.  Firefox allows a little more&#8212;but not all that long ago, it ignored all attempts to style form controls.  Opera blocks attempts at form styling, the last I checked.
</p>
<p>
Because there are no agreed answers, and each browser is making its own guesses, there are inevitably going to be conflicts.  If one out of five browsers uses (for example) padding to set the separation between the content and borders of text inputs, then <code>* {padding: 0;}</code> is going to make them seriously scrunchy, while the other four will completely ignore it.  I might then declare <code>input[type="text"] {padding: 2px;}</code>, but what happens when one of the other four starts applying styles to form controls, but treats padding on text inputs differently, <em>adding</em> padding to the default form control layout because it treats the whole interior of the input, instead of just the text, as the content?
</p>
<p>
As veterans of meyerweb have already guessed, this is not a post with answers.  Like many of my longer entries, it poses only questions and (I hope) provokes thought.  What I hope it also does is explain my aversion to applying CSS to form controls, and thus why I constructed a great big grouped selector for <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">my reset style sheet</a> instead of using the universal selector.  I understand why so many people want to go the universal route: it&#8217;s a lot simpler to type and uses a lot fewer characters.  I&#8217;m usually one for saving characters, but this is one case where I think extra characters are more than worth the possible cost.
</p>
</div>

</div>

</div>
<p style="font-size: 90%; text-align: right; margin-top: 0.5em; padding-top: 0;">(If you care, there's even an <a href="/eric/thoughts/page/2/">archive of previous thoughts</a>...)</p>

</div><div id="extra"><div class="panel" id="archipelago"><h4>Identity Archipelago</h4><ul><li><a href="http://flickr.com/photos/meyerweb/" rel="me">Flickr</a></li><li><a href="http://twitter.com/meyerweb/" rel="me">Twitter</a></li><li><a href="http://dopplr.com/traveller/meyerweb">Dopplr</a></li><li><a href="http://www.linkedin.com/in/meyerweb" rel="me">LinkedIn</a></li><li><a href="http://technorati.com/profile/emeyer" rel="me">Technorati</a></li></ul></div><div class="panel" id="pointers"><h4>Projects Elsewhere</h4><ul><li><a href="http://aneventapart.com/">An Event Apart</a></li><li><a href="http://complexspiral.com/">Complex Spiral Consulting</a></li><li><a href="http://www.webassist.com/go/css/emeyer/">CSS Sculptor</a></li><li><a href="http://css-discuss.org/">css-discuss</a></li><li><a href="http://microformats.org/">Microformats</a></li><li><a href="http://s5project.org/">S5</a></li></ul></div><div class="panel" id="tour"><ul><li><a href="http://fray.com/issue3/"><img src="http://fray.com/images/i3c.gif" alt="Fray Contributor (Issue 3: Sex &amp; Death)" /></a></li><!-- <li><a href="http://www.webassist.com/go/css/emeyer/"><img src="/pix/CS_ad_180x109.jpg" alt="CSS Sculptor for Dreamweaver" style="max-width: 100%;" /></a></li> --></ul></div><div class="panel">
<h4>Recently Tweeted</h4>
<p class="more"><a href="http://twitter.com/meyerweb">see more</a></p>
<p>Got a Pulse pen as a gift and hit an odd snag.  E-mail support from LiveScribe has been basically useless.  CS pool lacks any consistency. <small>&#8211;tweeted 10 hours, 4 minutes ago</small></p>
</div><div id="sideblog" class="panel">
<h4>Distractions</h4>
<p class="more">
<a href="/eric/thoughts/recent-links/">archive</a>
</p>
<ul>
<li><a href="http://tweetagewasteland.com/2010/03/my-head-is-in-the-cloud/" title="March 18 | &#8220;I sense that my addiction to the realtime stream is only making room for the consumption of a faster stream.&#8221;">My Head is in the Cloud</a> <small>[via <a href="http://daringfireball.net/">John</a>]</small></li>
<li><a href="http://8bitnyc.com/" title="March 17 | All of a sudden I want to establish a mission in Central Park and negotiate with the natives for gold and food.">8-Bit NYC</a></li>
<li><a href="http://www.youtube.com/watch?v=nFicqklGuB0&amp;feature=player_embedded" title="March 12 | Wry comment expressing my appreciation of the creative derivativeness of this video and its uncanny accuracy in mocking common tropes.">Academy Award Winning Movie Trailer</a></li>
<li><a href="http://www.youtube.com/watch?v=414TmP12WAU" title="March 9 | &#8220;Apple juice&#8230; for half price!&#8221;  More like twice PRICELESS.  (Note: If you&#8217;re at work, don your headphones.)">Happy in Paraguay</a> <small>[via <a href="http://unstoppablerobotninja.com/">Ethan</a>]</small></li>
<li><a href="http://www.youtube.com/watch?v=9V5ubAOeOBk&amp;feature=player_embedded" title="February 10 | This is approximately the best thing ever.">U900 -Walk Don&#8217;t Run (Isogabamaware)</a></li>
<li><a href="http://www.456bereastreet.com/archive/201002/sifr_default_css_hides_content_from_at_least_one_screen_reader/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A 456bereastreet %28456 Berea Street%29" title="February 8 | -9999px comes through again, but I really wish we were beyond that kind of thing.">sIFR default CSS hides content from at least one screen reader</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20100117064356428" title="February 8 | Storing this for future use.">Take a picture with the iSight camera when a folder is opened</a></li>
<li><a href="http://mingle2.com/blog/view/web-developer-mind" title="February 4 | Mostly valid.  (SEE WHAT I DID THERE?)">The Mind of a Web Developer: An Illustrated Diagram</a></li>
<li><a href="http://www.theonion.com/content/news/science_channel_refuses_to_dumb" title="January 28 | &#8220;Punkin Chunkin, for Christ&#8217;s sake&#8230; What more do you people want?&#8221;">Science Channel Refuses To Dumb Down Science Any Further</a></li>
<li><a href="http://www.mailchimp.com/blog/project-omnivore-declassified/" title="January 27 | Sounds like quite a feat.  But I wonder how we&#8217;d feel if Microsoft or Google announced the same kind of thing on their e-mail services.">MailChimp&#8217;s Project Omnivore: Declassified</a></li>
<li><a href="http://www.politifact.com/truth-o-meter/statements/2010/jan/25/carolyn-maloney/congresswoman-says-democratic-presidents-create-mo/" title="January 26 | &#8220;Obviously, luck matters a lot, but when there is a consistent pattern over more than 60 years, it starts to look like more than just luck.&#8221;">Congresswoman says Democratic presidents create more private-sector jobs</a></li>
<li><a href="http://www.ted.com/talks/taylor_mali_what_teachers_make.html" title="January 25 | Truth.">Taylor Mali: What teachers make</a></li>
<li><a href="http://notebook.johnmartz.com/how-websites-work?c=1" title="January 22 | At last, the truth is out and I can stop pretending:  beatific monkeys are what makes it all go.">How websites work</a></li>
</ul>
</div>
<div class="panel" id="advisory">
<div class="guarded">
<a href="http://blogadvisorysystem.com/"><img src="/pix/bas/guarded.png" alt="Blog Advisory System Alert Level: Guarded"></a>
</div>
</div>

<div class="panel" id="excuse">
<h4>The <a href="/feeds/excuse/">excuse of the day</a> is</h4>
<p>Chrome</p>
</div>

<div class="panel" id="extras">
<h4>Extras</h4>
<ul>
<li><a href="/feeds/">Feeds</a> &#8226;</li>
<li><a href="/eric/faq.html">FAQ</a> &#8226;</li>
<li><a href="/family.html">Family</a></li>
</ul>
</div>

</div>

<div id="navigate">
<h4>Navigation</h4>
<ul id="navlinks">
<li id="archLink"><a href="/eric/thoughts/">Archives</a></li>
<li id="cssLink"><a href="/eric/css/">CSS</a></li>
<li id="toolsLink"><a href="/eric/tools/">Toolbox</a></li>
<li id="writeLink"><a href="/eric/writing.html">Writing</a></li>
<li id="speakLink"><a href="/eric/talks/">Speaking</a></li>
<li id="otherLink"><a href="/other/">Leftovers</a></li>
<li id="aboutsite"><a href="/ui/about.html">About this site</a></li>
</ul>
</div>

<div id="footer">
<p class="sosumi">All contents of this site, unless otherwise noted, are &copy;1995-2008 <strong>Eric A. and Kathryn S. Meyer</strong>.  All Rights Reserved.</p>
<p>"<a href="/eric/thoughts/">Thoughts From Eric</a>" is powered by the &uuml;bercool <a href="http://wordpress.org/">WordPress</a></p>
</div>
</body>
</html>
