W3C home > Mailing lists > Public > www-style@w3.org > April 2005

WHATWG Attribute puzzle

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Tue, 05 Apr 2005 00:36:32 -0400
Message-ID: <425215D0.6080004@earthlink.net>
To: W3C CSS <www-style@w3.org>

    Say you're using one of those new WHATWG values for the |type| 
attribute of <input>:

| <input type="date" name="date1">

    How do you style the above markup so that user agents that support 
the "date" type will user one presentation, but legacy user agents will 
use another presentation? In other words, how would I put a green border 
around the date control I'd see in a Web Forms 2.0 compliant browser, 
but show a red border around the text box created in browsers that don't 
support it?

    I'm pretty sure the following does *not* work:

| input { border-width: 2px; border-color: blue; }
| input[type=text] { border-color: red; }
| input[type=date] { border-color: green; }

    Person who solves this gets the proverbial cookie.
Received on Tuesday, 5 April 2005 04:36:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC