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 1

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

Go to this page and roll your mouse over the links and watch what happens. Ha! Didn't expect that, did you? Doesn't it make you want to try it again? Go ahead. Then we'll show you how we did it.

In the HEAD of the example page, we have assigned several elements to the hover command: italic text with underlines and overlines, font size of 18, a font-family of Georgia as first priority (if the browser does not find it on the visitor's computer system it will look for "Times New Roman"), the font weight is bold and the color is red. To make it more interesting we gave the hover a background color of bright yellow. It is important to note that any font-family that is more than two words must be surrounded by quotation marks as shown with "Times New Roman". Do not use quotation marks with font-faces that are only one word. And separate all the font-family(s) with a comma and space as shown. Stating fonts that are uncommon is generally a waste of time as most people will not have Bolts (for example) on their computer systems, so the browser will merely skip over it anyway. Notice that each style element is separated with a semicolon and space. That is very important.

The code between the HEAD tags of this page looks like this(internal CSS):

<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; }
<style>

Here is the code for external style sheets that govern your entire website's link hovers:

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}

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 overline or underline, simply take it out. If you would rather replace the font-style with a normal style, simply change the word "italic" to "normal". Replace the color codes with whatever busts your bubble and ices your cookies. :) Okay, it's late and I'm on a roll---over. {snicker}

Obviously, we went overkill on this example to illustrate a point. Check what we did to this string of code in "Cheap Link Tricks, Part 2". I am almost starting to feel sorry for it. ;) And there you go, a Cheap Link Trick with CSS.


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