Simple way to make links plain?

Post all your tuts or request for tuts here.
Post Reply
Gheeda
Posts: 43
Joined: Fri Sep 03, 2010 12:12 am

Simple way to make links plain?

Post by Gheeda »

My links turn purple after click & are blue on click...I would prefer black text to remain black throughout and images as links to lack the purple/blue borders.
User avatar
Lord Strife
Posts: 104
Joined: Wed Oct 28, 2009 3:10 pm

Re: Simple way to make links plain?

Post by Lord Strife »

<style type="text/css">
A:link {text-decoration: none;color:black}
A:visited {text-decoration: none;color:black}
A:active {text-decoration: none;color:black}
A:hover {text-decoration: underline;color:black}
</style>

and for your image links add border="0"

<A href="link.html"><img src="images/imagelink.gif" border="0"></a>
Gheeda
Posts: 43
Joined: Fri Sep 03, 2010 12:12 am

Re: Simple way to make links plain?

Post by Gheeda »

Yay, proper looking pages now. tyvm
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Simple way to make links plain?

Post by Chris »

Lord Strife wrote:<style type="text/css">
A:link {text-decoration: none;color:black}
A:visited {text-decoration: none;color:black}
A:active {text-decoration: none;color:black}
A:hover {text-decoration: underline;color:black}
</style>

and for your image links add border="0"

<A href="link.html"><img src="images/imagelink.gif" border="0"></a>
You shouldn't use capital letters in CSS as HTML is now written with lowercase, not uppercase.

A:link {} should be a:link {} etc

Also rather than doing border="0" on an image you can do

Code: Select all

<style type="text/css">
a img {
	border: 0px;
}
</style>
Fighting for peace is declaring war on war. If you want peace be peaceful.
Post Reply

Return to “Tutorials”