Forum Moderators: not2easy

Message Too Old, No Replies

<a href=""></a> Setting for all links

         

Catnip

11:43 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



A lot of my links are the same (some are different) how can I do cover them all instead of using <a href="" class="default-link"></a>?

Can I just include something in this line?

TD, INPUT, P, TEXTAREA {font-family:Verdana, Arial, Helvetica, sans-serif;font-size: 12px;}

seindal

11:50 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



For A tags you need something like:

A:link { color: blue; background: none; }
A:visited { color: #663399; background: none; }
A:active { color: red; background: yellow; }
A:hover { color: blue; background: yellow; }

:link is the unvisited link
:visited is the visited link
:active is when it is clicked, but the mouse buttom has not been released
:hover is when the mouse is over the link without have clicked

René.

Catnip

12:31 am on Dec 6, 2002 (gmt 0)

10+ Year Member



That does not seem to work it overrides all other links.
:(

And adding <a href="" class="default-link"></a> to every link on a links page makes more characters then just using a old body tag.

<body bgcolor="#FFFFFF" text="#000000" link="#0066CC" vlink="#6DB5FE" alink="#FF0000">

So how do I make it so all links that don't have a class, default to a "default link"

seindal

12:55 am on Dec 6, 2002 (gmt 0)

10+ Year Member



You add a similar block of the classes for which you want different link styles. What I gave you basically sets the defaults. Then you have to define the exceptions. You can do something like

.menu-header A:link { color: black; background: none; }
.menu-header A:visited { color: black; background: none; }
.menu-header A:active { color: red; background: yellow; }
.menu-header A:hover { color: black; background: yellow; }

so you only define the colors (and whatever you want to set) for links within a CLASS=menu-header.

René.

Catnip

1:03 am on Dec 6, 2002 (gmt 0)

10+ Year Member



I'm still lost... ok here it is...

<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td width="49%" valign="top">
<h4>Content</h4>
<a href="http://www.xxx.com" class="default-link">Home</a>,
<a href="http://www.xxx.com/airlines/" class="default-link">Airlines</a>
</td>
</tr>
</table>

So I want to be able to not have any class tag and have it default to a default link class. This example is a small part from my site index and I have 36k pages so how can I do this without repeating the class tag over and over.

default-link =
.default-link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #0066CC;text-decoration: underline; background: transparent;}
.default-link:link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #0066CC;text-decoration: underline; background: transparent;}
.default-link:visited {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #6DB5FE;text-decoration: underline; background: transparent;}
.default-link:active {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #FF0000;text-decoration: underline; background: transparent;}
.default-link:hover {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #F88E06;text-decoration: underline; background: transparent;}

Duckula

1:25 am on Dec 6, 2002 (gmt 0)

10+ Year Member



.default-link:link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-style: normal; color: #0066CC;text-decoration: underline; background: transparent;}

It is:

.default-link a:link {etc...}
(maybe a.default-link:link {...})

Why? read the spec: [w3.org...]

Misao

1:30 am on Dec 6, 2002 (gmt 0)

10+ Year Member


what i usually would do is have the class set up in css.
the on each paragraph, just have the <p class="body-text">bler blerg </p>
or if it was a list:
<ul class="body-text">
<li>blerg</li>
<li>blerg</li>
</ul>

get the idea?
that save having to do it every single time....