Forum Moderators: open

Message Too Old, No Replies

Two different link styles on the one page?

Site design help (html)

         

sam_spetton

10:05 am on Jan 12, 2006 (gmt 0)

10+ Year Member



I am trying to do some a basic static website using dreamweaver & come across a problem. How can I have two different link styles on the one page?

I am using a .css file for all my styles which makes all the links the same. There are a couple of links that I need to make smaller & also have different color.
I played around in the .css file with the following:

h8 {

color: #0066CC;
text-decoration: underline;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
h8:hover {

color: #0099CC;
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;

I was thinking that that would work but it only works in opera browser (strange). Anyone know how I can add different styles to my text links?

Appreciate the help.

ska_demon

10:14 am on Jan 12, 2006 (gmt 0)

10+ Year Member



You could make multiple css files.

ie link1.css for one link style and link2.css for the second link style. I'm not a css expert but this is the way I have done it in the past.

Ska

Robin_reala

1:05 pm on Jan 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're referencing an <h8> element, but there isn't such a thing. I assume you've got <a href="" class="h8">? In which case, appropriate CSS would be:

.h8 {
color: #06C;
text-decoration: underline;
font: 10px Arial, Helvetica, sans-serif;
}
.h8:hover {
color: #09C;
text-decoration: none;
}

(I took the liberty of simplifying the CSS slightly as well)

JAB Creations

3:15 pm on Jan 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using headers should look something like this when done properly...

<h1></h1><h2></h2><h3></h3><h2></h2><h3></h3><h4></h4><h5></h5><h6></h6>

It's just like this example with spans and paragraph elements...

Proper

<p><span></span></p>

Improper

<p><span></p></span>

You can't intermix elements like I did with my improper example of p and span elements. While the validator will only catch you if you do this....

<h4><h3></h4></h3>

It will not make you aware that the structure of your page looks odd. Think about it like this, if you have no header2, why would you need a header 3? So I have yet to see a properly coded page (well that too heh) that gets close to using h5.