BradTrupp.com - Little slices of my life and my projects BradTrupp.com -- Tags -- Old Articles
BradTrupp.com -- Tags -- Old Articles -- CSS - A Few Quick Tips (Website Tips)

CSS - A Few Quick Tips (Website Tips)
(2007/10/09)

Here are a few tips and tricks using CSS or Cascading Style Sheets to put a few special effects on your web pages.

Just copy and paste the sample code...

Roll-over Color Text Links

Your text links will change color as the mouse passes over. Insert this code into the <HEAD> of your document...

<style type="text/css">
<!--
A:hover {color:red}
-->
</style>

Links with no Underline

Put this code in the <HEAD> of your document to remove the underline from all links on your page...

<style type="text/css">
<!--
A:link {text-decoration:none}
A:visited {text-decoration:none}
-->
</style>

Or, remove the underline from individual links like this...

<a href="page.html" style="text-decoration: none">link</a>

Links with a Line Above and Below

This works well as a hover attribute on links, but can also be applied to all of your links. It will show the normal underline plus a line above the link too...

<style type="text/css">
<!--
A:hover {text-decoration:overline underline}
-->
</style>

Sample Link with a Line Above and Below

Highlighted Text

To highlight important text on your page or just to get words to stand out...

<span style="background-color:yellow">highlighted text</span>

Sample Highlighted Text

To highlight all links on your page, put this code in the <HEAD> of your document:

<style type="text/css">
<!--
A:hover {background-color: orange}
-->
</style>

Background Images

This will create a background image that doesn't repeat...

<style type="text/css">
<!--
BODY {background: #ffffff url(bg.gif) no-repeat}
-->
</style>

You can also center the image on the web page...

<style type="text/css">
<!--
BODY {background: #ffffff url(bg.gif) no-repeat center}
-->
</style>

Tags: Old Articles

Share: Del.icio.us | Digg | Facebook | Google Bookmarks | Reddit | Technorati | Twitter | Windows Live | Yahoo! My Web

View Comments (0)


 

Tag: Old Articles
Minimum Width for a Page using CSS (Website Tips) (2008/10/14)
CSS 3D Push Button Effect (Website Tips) (2008/10/14)
MySQL Commands (MySql) (2008/04/29)
Force URLs to have WWW prefix (Website Tips) (2008/03/16)
Installing Ubuntu 7.10 on a Dell 300m (Ubuntu) (2007/12/08)
DVD's - Skipping the Previews Quickly (Productivity Tips) (2007/12/03)
Organizing Desk Drawers (Productivity Tips) (2007/12/03)
Opening Clamshell Packs (Productivity Tips) (2007/12/03)
That Battery - Charged or not? (Productivity Tips) (2007/12/03)
One Line Template Engine (PHP) (2007/11/17)
Prevent Automatic Resizing of Images (Firefox) (2007/10/23)
Boot into Safe Mode (Windows XP) (2007/10/11)
CSS - A Few Quick Tips (Website Tips) (2007/10/09)
Disable Blinking Elements (Firefox) (2007/10/05)
Restore your Database from a Backup (MySql) (2007/09/29)
Nine Random Thoughts on Improving your Web Site. (Website Tips) (2007/09/26)
Mac Mini HTPC - More Great Software (Apple) (2007/09/23)
Optimization for High Speed Connections (Firefox) (2007/09/21)
What Businesses may Vanish in the next Decade (Business Tips) (2007/09/17)
Speed up your Use of Tabs (Firefox) (2007/09/16)
Sharing Folders between Ubuntu and Windows XP (Ubuntu) (2007/09/12)
Nine Random Thoughts on Off-line Promotion (Business Tips) (2007/09/11)
Keeping Email Reply Chains simplier with Gmail (Productivity Tips) (2007/09/08)
Key points to Successful and Consistent Revenue Generation (Business Tips) (2007/09/06)
Mac Mini HTPC - Network Attached Storage (Apple) (2007/08/23)
Mac Mini HTPC - Extend Quicktime with additional Codecs (Apple) (2007/08/03)
Keyboard Shortcuts for Front Row (Apple) (2007/07/29)
Mac Mini HTPC - Basic Setup and VNC (Apple) (2007/07/27)
Play MP3's with Ubuntu (Ubuntu) (2007/07/14)
Monitor CPU Temperature in Ubuntu (Ubuntu) (2007/07/14)
Add another Hard Drive to Ubuntu (Ubuntu) (2007/07/14)
Use MYSQLDUMP and CRON to backup Databases (MySql) (2006/05/23)
Reflections on Company Policies (Business Tips) (2006/05/01)
Understanding Google Adsense (Website Tips) (2006/01/16)
Old Articles - Windows
Old Articles - Websites
Old Articles - Linux
Old Articles - Business and Productivity
Old Articles - Apple

All Tags
Business Tips (5)
Code (13)
Life Skills (1)
Music (2)
My 15 minutes (5)
Old Articles (39)
Photos (10)

Advertisement