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 ...

Get Web Development Recipes, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.