Creating CSS Buttons (i)

Source: Internet
Author: User
Introduction
Being able to successfully navigate a Web site was a important metric in measuring a site ' s usability. To assist with navigation, many Web sites use graphical buttons (usually GIF files). While this buttons are not terribly difficult to create with a decent image editor, they can is a bit burdensome when all Have at your disposal is Microsoft Paint. Furthermore, while graphical buttons does not add so much size to the page, the bandwidth requirements does add up, Resultin G in slower loading the pages for your users.
One solution is to use cascading style sheets (CSS) to create buttons. Using CSS, can create buttons with just a few lines of plain text HTML and CSS tags! (To learn more about CSS, being sure to check out this links.) The downside of using CSS to generate buttons are that buttons look less professional (in I opinion) and that they can Only is rendered on css-compliant browsers. For the examples we'll be looking on in this article, they are functional in both IE 5.0+ and Netscape 6.1+. Certain "Extra" features, which we'll be sure to the note, only work in IE.
Creating CSS Buttons
The idea for creating CSS buttons is shamelessly borrowed from the Book:web design:the Complete. This book presented some the code that could is used to generate a button using style sheets. The below code shows a simple example:
<% ' Define the stylesheet%>
<style type= "Text/css" >
<!--
#mybutton {border-style:inset;
Border-color: #ff6633;
Background-color: #CC3300;
Text-decoration:none;
width:80px;
Text-align:center;}

A.buttontext {color:white;
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.