O'Reilly logo

Web Development Recipes, 2nd Edition by Chris Johnson, Mike Weber, Chris Warren, Brian P. Hogan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe 1Styling Buttons and Links

Problem

Buttons are an important element in user interaction with our websites, but each browser has its own idea of what a button should look like. On top of that, sometimes we might want links to look like buttons. For example, if we have a form on a page, we may want a button that submits the form, and a link that cancels the process and takes us to another part of the site—and we want those elements to match visually. Additionally, it’d be great if we could control the look of form buttons without having to create a new graphic with new text each time we need one.

Ingredient

  • A CSS3-compliant web browser, such as Internet Explorer 9 or higher, Safari, Opera, Firefox, or Chrome

Solution

Using CSS to style form ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required