W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Placeholder option for text input boxes

From: Nils Dagsson Moskopp <nils-dagsson-moskopp@dieweltistgarnichtso.net>
Date: Fri, 03 Oct 2008 18:51:49 +0200
Message-ID: <1223052709.12974.1.camel@dell.linuxdev.us.dell.com>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <style type="text/css">
            *
            {
                font-size:              12px;
            }

            input
            {
                background-color:       white;
                margin-left:            -1em;
                opacity:                0.5;
                padding:                0.5em;
                vertical-align:         middle;
            }

            input:focus
            {
                opacity:                1.0;
            }

            span
            {
                display:                inline-block;
                margin-left:            0.5em;
                height:                 2em;
                width:                  0;
            }
        </style>
    </head>

    <body>
        <form>
            <fieldset>
                <legend>no placeholder attribute necessary</legend>
                <label for="input">
                    <span>amirite?</span>
                    <input type="text" id="input"/>
                </label>
            </fieldset>
        </form>
    </body>

</html>
Received on Friday, 3 October 2008 09:51:49 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC