View Full Version : External Style Sheets, :\


Hmmmmmmmm
08-15-2003, 10:10 AM
Alright, my question, before I type out the code at all.
How do you make different classes of links?


Can I use make a new class of link sets called; A:Link2? and hold that in <a href="#" class="link2">
żOr do I just use menu links?


(I disaprove of menulinks due to javascript)

:\

MaGiCSuN
08-15-2003, 11:47 AM
you make classes like this:

you add to your stylesheet file (i guess you use that, because your title is external style sheets so i guess you are talking about .css files) the following:

.link2 A:link {color: #E50683; text-decoration: none; }
.link2 A:visited {color: #E50683; text-decoration: none; }
.link2 A:active {color: #E50683; text-decoration: none; }
.link2 A:hover {color: #FFFFFF; text-decoration: none; }

now you add to your link:

class="link2"

or you add a div around the links that belong to that class like this:

<div class="link2">
Links here
</div>

so if you would put the codes between your <head> and </head> then it would look something like this:

<style type="text/css">
<!--

A:link {color: #E50683; text-decoration: none; }
A:visited {color: #E50683; text-decoration: none; }
A:active {color: #E50683; text-decoration: none; }
A:hover {color: #FFFFFF; text-decoration: none; }

.link2 A:link {color: #E50683; text-decoration: none; }
.link2 A:visited {color: #E50683; text-decoration: none; }
.link2 A:active {color: #E50683; text-decoration: none; }
.link2 A:hover {color: #FFFFFF; text-decoration: none; }

-->
</style>

the red part is the normal part that goes for all the links in the body section. The blue part goes for links that have class="link2" in them or are inside a div with the class name "link2" in it.

Love,
Mirna

Hmmmmmmmm
08-16-2003, 02:44 AM
Ok, can I just make up class names? for anything? as long as its related to whatever?


Text4
{ font-family: verdana;
color: #000000;
letter-spacing: value;
font-weight: normal;
font-size: 10pt;}



<div class=text4>

can i do that?

pb&j
08-16-2003, 04:06 AM
almost.

.Text4
{font-family: verdana;
color: #000000;
letter-spacing: value;
font-weight: normal;
font-size: 10pt;}

<div class="text4">
</div>

you have to put a period infront of the css name and that makes it a "class" which can be added to whatever html tag.