Click to See Complete Forum and Search --> : Please help me again on this


Dark Dragon
08-29-2003, 04:29 PM
First I want to thank Pyro, LavaLamp and all those who helped me on the rollover issue, I truly appreciate your efforts..however I am afraid I did not represent my problem too well.

Okay this code is supposed to be for a rollover link:

<h4 onmouseover="style.color='red'" onmouseout="style.color='black'">
Test Link</h4>

the code makes the text turn color as you move the mouse pointer over it..I also want it to be a link BUT I also still want it to change colors too. So as the visitor moves the mouse over it, they can also click on the same words to get elsewhere..this is what I was trying to convey.

I liked Pyro's code he gave me but in this case I already have a graphic allocated as a header..so I can't use it yet....but if I use the
<a href> tag then the text will be underlined as many hyperlinks are and the rollover effect will no longer work

I do not want to use a Swap Image thing..just code for now but the DreamWeaver reference guide is of little help as it only adressess the use of graphics in rollovers...thanks

pyro
08-29-2003, 04:33 PM
Please explain why you would use a <h4> tag as a link... The best you can do with that is use JavaScript to make it go anywhere when you click on it. And that is bad. With a regulare link (<a>) you can use CSS to style it, so it can look exactly like the <h4> tag. Do you just need some code that will change the link to a diff. color when you mouseover it?

Dark Dragon
08-29-2003, 04:39 PM
I used the h4 because it controls the size of the text...I am trying to make this HTML 4.0 compliant..

Okay..the code I just posted was supposed to be for a rollover link...like I said earlier..not only is it supposed to change color BUT, when clicked will go to its allocated destination...

I don't need the header to change color..just the link.

So here is how it goes:

1) Visitor sees link

2) Visitor moves mouse over link

3) Link changes color as visitor's mouse pointer goes over it

4) Visitor clicks on link to go "somewhere"....

P.S..I tried making a CSS but the DW references don't even adress that..

pyro
08-29-2003, 04:42 PM
No need to use the <h4> tag. All you need is some CSS:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Link Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
a.link {
color: black;
text-decoration: none;
font-weight: bold;
}
a.link:hover {
color: red;
}
</style>
</head>
<body>
<p><a href="http://www.webdevfaqs.com" class="link">Web Dev FAQs</a><br>
<a href="http://www.w3c.org" class="link">W3C</a><br>
<a href="http://www.infinitypages.com" class="link">Infinity Web Design</a><br></p>
<p><a href="http://forums.webdeveloper.com">This</a> is a regular link...</p>
</body>
</html>

Dark Dragon
08-29-2003, 04:49 PM
WOW! Thanks Pyro..that is exactly what I was looking for.....thanks for the help..my head no longer hurts from all the thinking :D

Jupac
08-31-2003, 08:55 PM
lol now we should call pyro phpadvil