Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles & Tutorials for Work at Home Entrepreneurs
Webmasters and Small Business Owners
Get More >

Newest Articles 
CSS
Web Design
Graphic Design
Color Theory
Promotional
Make More Money
Timesavers
Business Ethics
Glossary of Terms
Reviews
Marketing
Business Resources




Name
Email

Link to Us!

CSS
Email this article  :  Printer friendly page


Cheap "Link" Tricks, Part 2

Here is a quick little trick to enhance your page links using CSS. This is the Part 2 in a series of cheap link tricks we will be publishing. :)

If you haven't read Part 1? Go there now.

Now onto Part 2: Go to this page and roll your mouse over the links and watch what happens. Ha! Didn't expect that again, did you? Okay, maybe you did. But go ahead, try it again, and then we'll show you how we did it.

In addition to the hover elements we added in Part 1, we have added several new elements. We added a text-transform property to make all hovers uppercase letters spaced 2 pixels apart. We added padding to the hover consisting of 2 pixels on the top and bottom and 1 pixel to the right and left. To make it jump out further, we included a solid blue background border that is 2 pixels wide at the top and bottom with a 3 pixels wide border on the left and right in green.

Yes, we know this week's example is really extreme, but we wanted to put as many elements in the style block so you could have fun taking them out one-by-one and then viewing your page with/without them. It also is the perfect example of "What Happens When You Go Crazy with CSS" ... lol

The code between the HEAD tags of this page looks like this (use it for each page you want the effect to appear on):

<style type="text/css">
<!--
a:hover { font-style: italic; text-decoration: underline overline; font-size: 18px; font-family: Georgia, "Times New Roman"; font-weight: bold; color: #FF0000; background-color: #FFFF00; text-transform: uppercase; letter-spacing: 2px; padding-top: 2px; padding-right: 1px; padding-bottom: 2px; padding-left: 1px; border-color: #0000CC #009900; border-style: solid; border-top-width: 2px; border-right-width: 3px; border-bottom-width: 2px; border-left-width: 3px}
-->
</style>

The Code for external style sheets (controls your entire website's link hovers and is highly recommended):

a:hover { font-style: italic; text-decoration: underline overline; font-size: 18px; font-family: Georgia, "Times New Roman"; font-weight: bold; color: #FF0000; background-color: #FFFF00; text-transform: uppercase; letter-spacing: 2px; padding-top: 2px; padding-right: 1px; padding-bottom: 2px; padding-left: 1px; border-color: #0000CC #009900; border-style: solid; border-top-width: 2px; border-right-width: 3px; border-bottom-width: 2px; border-left-width: 3px}

Incidently, if you want to control the text size on your web pages so that your visitors are better able to view your pages as you intended, always use "px" (pixels).

Don't be afraid to take out style elements and see how your page looks without them. Try taking out one at a time and see what looks best to you. If you don't like the borders, simply take them out. If you would rather replace the text-transform with a lowercase style, change the word "uppercase" to "lowercase". Replace the color codes with whatever floats your boat or tickles your nose. :) Okay, it's NOT late but I'm still on a roll---over. {snicker}

And there you go, another Cheap Link Trick with CSS by BasicTemplates.com.


Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.com, CSS HTML Web Site Templates with Exernal CSS and Removable Graphics. If you found our articles helpful, subscribe to our newsletter and get articles like this delivered to your inbox - FREE.

Newest Articles in
CSS
Using Multiple External Style Sheets
Resizing Form Input Boxes, Buttons, and Text with CSS
Novel Paragraph Spacing with CSS
Is Your Site Ready for the Holidays? Part 3
Is Your Site Ready for the Holidays? Part 2

 

Page copy protected against web site content infringement by Copyscape
All articles are originally authored by BasicTemplates.com. Reprints in whole or in part are not permitted. See Copyright Notice

Copyright © 1994-2006 BasicTips.com, a division of BasicTemplates.com, Web Site Templates with External CSS
The Internet's #1 Choice for HTML CSS Web Templates via a Membership. Designed using External CSS and Removable, Swap-Out Graphics.
Basic Web Templates | Website Templates | HTML CSS Templates | Web Design Templates | Web Site Templates