PDA

View Full Version : making links NOT underlined...


horrorcollect
08-06-2002, 12:00 AM
Hi guys - Im using Dreamweaver and im having 2 problems with links.

One is, I want some links on my pages one color, and other links on the SAME page a different color. However, because i have to set "Page Properties" on Dreamweaver, i HAVE to make all the links one color, and i cannot change them. is there anything i can do?

also, i want all of my links to NOT be underlined. i tried using:

class="noline"

but it didnt do anything.

any suggestions for customizing these links? i know it can be done. i will gladly use any HTML codes, the solution doesnt have to be via Dreamweaver.

Thanks!

[keith t]

boxer_1
08-06-2002, 12:57 AM
This is a rather long winded example, but you should really define all states of your links to ensure uniform results. You would put this in the <head> section of your page:

<style type="text/css">
A.reg:link {
font-family: "Arial";
color: #ffff00;
font-weight: 600;
font-size: 12pt;
text-decoration: none;
}

A.reg:visited {
font-size: 12pt;
font-family: "Arial";
color: #ffff00;
font-weight: 700;
text-decoration: none;
}

A.reg:hover {
font-size: 12pt;
font-family: "Arial";
color: #ff0000;
font-weight: 700;
text-decoration: underline overline;
}

A.reg:active {
font-size: 12pt;
font-family: "Arial";
color: #ff0000;
font-weight: 700;
text-decoration: underline overline;
}

A.bl:link {
font-family: "Arial";
color: #ffff00;
font-weight: 700;
font-size: 16pt;
text-decoration: none;
}

A.bl:visited: {
font-family: "Arial";
color: #ffff00;
font-weight: 700;
font-size: 16pt;
text-decoration: none;
}

A.bl:hover {
font-family: "Arial";
color: #ff0000;
font-weight: 700;
font-size: 16pt;
background-color: #0000ff;
text-decoration: underline overline;
}

A.bl:active {
font-family: "Arial";
color: #ff0000;
font-weight: 700;
font-size: 16pt;
text-decoration: none;
}
</style>

Of course you would modify the above to suit yourself. Notice I used 2 classes in the example (bl and reg). You would set the classes in your anchors like this:

<a class="reg" href="yourPage.html">Inherits reg style</a>

<a class="bl" href="yourPage.html">Inherits bl style</a>

Does this give you the general idea?

horrorcollect
08-06-2002, 03:59 AM
Wow thanks... I will try that right now.

Does that also make my links NOT underlined? they look so tacky underlined.

And, what does "bl" and "reg" mean or do? ive never heard of that...

Thanks again boxer

[keith t.]

boxer_1
08-06-2002, 04:24 AM
Originally posted by horrorcollect
Wow thanks... I will try that right now.

Does that also make my links NOT underlined? they look so tacky underlined.

And, what does "bl" and "reg" mean or do? ive never heard of that...

Thanks again boxer

[keith t.]

You're welcome :thumbsup: ! To keep all of your links from being underlined set all occurances of text-decoration to none. Like this:

A.reg:link {
text-decoration: none;
}

Now, the "bl" and "reg" are classes. These allow you to define different styles for different elements of your page. Like I showed you in my first post. If you want your links to have the style you set for A.reg:link, set up your links like this:

<a class="reg" href="yourPage.html">This link has the style you defined for the A.reg:... class</a>

Any help?