I ran across some CSS that I though was pretty cool, but can't seem to find 
much information on its usage.  What do you think?

Some simple code to show first:
<!DOCTYPE html>
                <head>
                                <meta charset="UTF-8" />
                                <meta name="viewport" 
content="width=device-width, initial-scale=1.0">
                                <title>Test Page</title>
                                <style type="text/css">

                                                input {
                                                    width:200px;
                                                }
                                                .help {
                                                    display:none;
                                                    font-size:90%;
                                                }
                                                input:focus + .help {
                                                    display:inline-block;
                                                }
                                </style>

                </head>
                <body>
            <label for="name">Name (required):</label>
            <input type="text" id="name" name="name" value="" 
aria-describedby="name-format" required>
            <span id="name-format" class="help">Format: Firstname, 
Lastname</span>
                </body>
</html>

Clicking in the input field changes the class .help, although the input field 
has no class attached to it.

Are there any other attributes that have this capability?




Greg

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to