[web] Man this is pissing me off.

Started by
6 comments, last by SSJCORY 19 years, 8 months ago
I'm still trying to get those arrows to work properly. I want it so that if the link is already visited it still stays blue but the arrow goes back to black. What am i doing wrong?

<html>
<head>
<title></title>
<style type="text/css">
a.nav{
text-align:center;
text-decoration:none;
}
a.nav strong{
color:black;
}
a.nav:visited{
color:blue;
}
a.nav:visited strong{
color:black;
}
a.nav:hover{
color:blue;
}
a.nav:hover strong{
color:blue;
}
</style>
<body bgcolor="black">
<a class="nav"href="http://www.gamedev.net"><strong>&#187</strong>Gamedev.net</a>
</body>
</html>


It should work i dont know why it doesn't :(
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Advertisement
a.nav:visited strong{
color:black;
}

If this link has been visited and you have a strong tag then the color should be black right? Your arrow is in the strong tag right? So shouldn't you change that to be blue?
I have no idea what you're trying to do but this works. Links will remain the visited color when accessed.
<!--1. <head> tag was not closed.2. <body> tag used HTML formatting instead of CSS.--><html><head><title>Test</title><style type="text/css" title="baseCSS">	body { background: #000000; } /* background is black */	.arrow { color: #FFFFFF; font-weight: bold; text-decoration: none; }	a.nav:link { color: #FFFFFF; } /* nav.links are white */	a.nav:visited { color: #006600; } /* visited.nav.links are dark green */	a.nav:hover { color: #00FF00; } /* nav.links are bright green when hovered over */</style></head><body><a class="nav" href="http://www.gamedev.net/" target="_blank">Gamedev.net</a><br /><a class="nav" href="http://www.google.com/" target="_blank">Google.com</a><br /><a class="nav" href="http://www.flipcode.com/" target="_blank">Flipcode.com</a><br /><span class="arrow">&raquo;&nbsp;</span><a class="nav" href="http://www.gamedev.net/">Gamedev.net</a></body></html>

You should use CSS in a separate file via the <style src=""> tag. It's easier to debug when needed and lessens the page's load time. Also try to keep short CSS statements to one line.
Urs doesn't work i stuck the whole thing and it didn't work. It actually worked way worse than mine.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Incorrect. The example I provided does work, however, it may not satisfy your requirements.

What exactly are you trying to do?
When you mouse over a link it should bring up the arrows. Right now the a:visited is set to default. But i cant set it so the visited makes it stay the same instead of defaulting to that purplish color.So lets say the color of the link i want to always stay blue. BUT i want the arrows to only come up on mouseover. Get it?
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
So change all the links to the same color. Judging from your site, you already have it down.

<html><head><title>Test</title><style type="text/css" title="baseCSS">	body { background: #222222; } /* background is dark grey */	a.nav { text-decoration: none; }	a.nav:link { color: #FFFFFF; } /* nav.links are white */	a.nav:visited { color: #FFFFFF; } /* visited.nav.links are dark green */	a.nav:hover { color: #FFFFFF; } /* nav.links are bright green when hovered over */	a.nav strong { color: #222222; } /* » 'normal' color */	a.nav:hover strong { color: #FFFFFF; } /* » 'hover' color */</style></head><body> <a class="nav" href="http://www.gamedev.net/" target="_blank"><strong>» </strong>GameDev.net</a><br /><a class="nav" href="http://www.metavirus.net/" target="_blank"><strong>» </strong>MetaVirus.net</a><br /> <a class="nav" href="http://www.gfxdesigner.com/" target="_blank"><strong>» </strong>GFXDesigner.com</a><br /> </body></html>
Well that didn't work cuz the colors were off but yes i got it now thanks bro you've been a big help. I dont know why my original didn't work.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|

This topic is closed to new replies.

Advertisement