Home | Web Design Tutorials | Free Graphics | Custom Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Benefits | Login | View Cart |
How to Add Text to Blank Buttons
They look like a series of individual buttons, but all the buttons are the same blank button. I call this the Mighty Mouseover Button technique. Here's the blank button I used for all the buttons:
AdvantagesSo what are the advantages of this technique?
Here's how it's done...To make Mighty Mouseover Buttons, you first need to place an embedded style tag in the <HEAD> section of your HTML page.<style type="text/css"> a:link {color:#000080; text-decoration: none;} a:visited {color:#946C6B; text-decoration: none;} a:hover {color:#FF0000; text-decoration: none;} a:active {color: #B70004; text-decoration: none;} </style>That is the part that controls the link colors and removes the default underline from the link text. Change the colors to your liking. If you want your link text underlined, remove the part that reads, text-decoration: none; from each link state where you want an underline. You can also place the link properties in an external style sheet if you have your web site set up that way.
Next comes the tricky part, but it's not too bad if you've ever worked with tables before. Below is the code for one button: <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="background-image: url(images/button.jpg); width: 160px; height: 35px; text-align: center; vertical-align: middle;"> <a href="index.html">Home Page</a> </td></tr></table>You'd repeat this code for each button, just changing the URL and link title to create a new button. Let's break it all down to be sure you understand what's going on. <table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background-image: url(images/button.jpg);
The second line sets the width and height of the table data cell. The third line centers the text horizontally and vertically within the table data cell. <a href="index.html" style="text-decoration:none">Home Page</a>
Note: The style="text-decoration:none" I show in gray removes the underline from the link. I also showed that in the <HEAD> section style tags earlier, but if you use plain text links on the same page and want the plain text links to be underlined, using the text-decoration property in the HEAD section will remove the underline from the plain text links too. If you don't want that to happen, remove the text-decoration string from the HEAD section and add it to the link code as shown in gray above. If you don't want any links to be underlined and have the text-decoration string in the HEAD section style code, then it isn't necessary to repeat it in the link. The rest of the code, of course, just cancels the link and the table. You can include a change in font size, add a bold tag, or any other code you would normally want to use with your links as well. For the sake of simplicity, I didn't show that, but on the button examples on this page I did change the font size with each button link. Other things to know...
Now go thank your lucky stars for your good fortune! It's much greater than you realize. |
Almost a NewsletterChanging list hosts. Will post a new subscribe form shortly.Did you know...The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ] |
|||||
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Press Room
Sitemap | Member Perks | Member Login | About BoogieJack.com | Contact | Privacy Policy | Copyright Policy | Links
|