CSS3 brings a wealth of new properties to the web and to modern browsers. There is a greatly reduced dependency on images in creating rich, stylized content. I’ve used a few of these new properties to render the submit buttons throughout this site. It’s a basic solution to a common request that was previously only possible with imagery.
Tag: HTML
Styling Input and Anchor tags as action buttons with cross-platform support
Attempting to style inline objects consistently across multiple browsers and platforms is difficult enough with unpredictable standards support — trying to maintain that exact style across form input elements as well has been near fantasy until recently. Thankfully, with the combined knowledge of the web development community and rapid adoption of reworked web standards by modern browsers, solutions are available.
For a recent project I had the task of applying one consistent button style to form inputs, anchor tags, and a handful of paragraph tags — with varying widths and background colors. Taking a cue from the brilliant work already posted on the Filament Group (which is derivative of the ALA sliding doors method and the work of Kevin Hale at Particletree), I developed a class that isĀ applicable across a variety of elements. The examples given were generally applied to the button element; my project called for standard inputs with type ‘submit’. The class scope is left open to allow for easier application to non-form elements. A few instances:
<a href="#" class="input-btn-link"><span>Add to Favorites</span></a> <a href="#" class="input-btn-link small"><span>Add to Favorites</span></a> <input class="input-btn" type="submit" value="Add to Favorites" /> <input class="input-btn small" type="submit" value="Add to Favorites" /> <input class="input-btn medium" type="submit" value="Add to Favorites" /> <input class="input-btn large" type="submit" value="Add to Favorites" /> <p class="input-btn">Add to Favorites/p> </p>
HTML5 in the News
HTML5 this week (mostly for my own reference)
Get Ready for HTML 5, A List Apart
HTML Redefines Footer, Jeffrey Zeldman
HTML Super Friends, Technical Details
HTML5 for Smarties, Jeffrey Zeldman
withoutnations