W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: <select> elements are the last of the system widgets to require hacky styling

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 01 Nov 2012 11:03:16 -0400
Message-ID: <50928F34.3000609@mit.edu>
To: www-style@w3.org
On 11/1/12 4:17 AM, Markus Ernst wrote:
> One very basic issue about hackiness in styling the select element is
> that the following CSS:
>
> input[type=text], select {
>    width:10em;
>    border:2px solid red;
> }
>
> will result in different widths for the text and select boxes. This is
> totally unintuitive and annoying.

That's because the select uses border-box box-sizing, right?  Simply 
resetting the box-sizing so they match will fix that issue, I'd think.

-Boris
Received on Thursday, 1 November 2012 15:03:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT