Quick html / Dreamweaver question

Miscellaneous Forums/General Discussion/Quick html / Dreamweaver question

I'm building a page where the links at the top are text, not images. I want the text colour NOT to change for visited links etc. If I stipulate colours in Page Properties for links, rollovers, visited, active etc, it means that ALL text links in that page have to be the same colour. Am I wrong? I would like to have some of them white, some grey, some whatever - but ALL rollover yellow (or not rollover), and ALL return to their specified colours even after the link is visited. Is there a further option somewhere or an extra tag I can insert to do this?

Work with CSS classes :)

Example:
<style type="text/css">
#blahblahblah a:link {
color: #FF0000;
}

#blahblahblah a:hover {
color: #0000FF;
}

#blahblahblah a:visited {
color: #FF0000;
}
</style>

<a href="test.html" class="blahblahblah">clicky</a>


You should look into using CSS - allows you to control the styles of every page in your site from an individual separate file.

Anyway, add this to the head within the html:

<style type="text/css">
a {color: [NOTE -put your link colour here e.g. #ff0000];}
a:hover {color: [NOTE -repeat your colour here];}
</style>


You should take a look here for CSS tutorials:

http://www.w3schools.com/css/default.asp

@gameboy: but he wants to apply it on only a few links, not all :) your code applies on all the links as it has no class assigned to it.

I've used CSS a little before - I completely forgot! Dreamweaver can set that up for me without even delving into code - I'll do that.

lol.. you got Studio 8 then? ;-) good luck!

Hmmm... Yeah, Studio 8 is a lot more complicated than Dreamweaver 4. Blech. I've figured it out as far as making the style I want, having it the colour I want, and stay that colour once it's been visited, and having it rollover with the page properties colour, BUT! Is there a way to add a rollover colour to each CSS style? So that I could have the white links rollover yellow, and the blue links rollover cyan for example? I couldn't see anything...

Use the :hover tag and have the changed colour there.

.White a{ color:#FFFFFF }
.White a:hover { color: #FFFF00 }

.Blue a{ color:#0000FF }
.Blue a:hover { color: #00DDFF}

right, reason mine wasn't working was because i used "#" instead of "."

a # refers to an ID, example: <a href="test.html" id="someclass">test</a>

a . refers to a class, example: <a href="test.html" class="someclass">test</a>

Brilliant - that's exactly what I needed. Thanks!