would anyone point out why my hover link won't work??? thanks.
css doc:
a.nav:link{color:#FFFFFF; text-decoration: none; } a.nav:visited{color:#FFFFFF; text-decoration: none; } a.nav:hover{color:#FFFFFF; text-decoration:underline; } a.nav:active{color: white; }
html doc:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="css/text.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Xsoldier_Home</title> </head> <style type="text/css"> #wrapper { position: absolute; width: 800px; height: 820px; top: 0px; left: 412px; border: solid; border-bottom: groove; background:url(image/xsoldierWallHome.jpg); } #menu { position: absolute; width: 300px; height: 30px; top: 250px; left: 965px; border: none; background-color:none; } </style> <body bgcolor="#333333"> <div id="wrapper"> </div> <div id="menu"> <a href="http://www.yahoo.com" style="text-decoration:none"><b><font color="#FFFFFF">:: HENRY'S :: </font></b></a> <a href="http://www.msn.com" style="text-decoration: none"><b><font color="#FFFFFF">IT NOTE :: </font></b></a> <a href="http://www.msn.com" style="text-decoration: none"><b><font color="#FFFFFF">BLOG :: </font></b></a> </div> </body> </html>
<!DOCTYPE html PUBLIC
Xsoldier_Home
a:link{color:#FFFFFF; text-decoration: none; }
a:visited{color:#FFFFFF; text-decoration: none; }
a:hover{color:#FFFFFF; text-decoration:underline; }
a:active{color: white; }
And where have you placed
:? And where have you placed the class .nav ?
Before you go too far with your markup please remove the bold and font tags neither are necessary, and font tags are simply not used any more period.
from what I can tell of your
from what I can tell of your markup is that none of your anchors have the class nav - so ya... either give your anchors the class nav or remove the class nav from your css.
css file in separate text
I have a separate text document to hold my css code, i learned this from somewhere. (hopefully it is right)
in my css file: named "text.css"
a:link{color:#00CC00; text-decoration:none} a:visit{color: white; text-decoration:none} a:hover{background:#9966CC; color: white; text-decoration:underline}
and then i connected them by having this line of code inside the .. :
<link rel="stylesheet" type="text/css" href="css/text.css"/>
I also tried putting the
a:link{color:#00CC00; text-decoration:none} a:visit{color: white; text-decoration:none} a:hover{background:#9966CC; color: white; text-decoration:underline}
inside the .. didn't work.
I also tried:
<a class="nav" href="http://www.yahoo.com" style="text-decoration:none">:: HENRY'S :: </a>
// is the above the proper way? i thought so but it didn't work.
// the thing is, if you used dreamweaver, after you typed class=" the classes available will pop up, but my "nav" didn't pop up so i guess it is somehow not connected to the css sheet.
Would someone please give me a quick example? either putting the a:hover{.... } thing locally or externally... Thanks very much.
It's recommend that you get
It's recommend that you get the grips on the basics of HTML and CSS.
The HTMLDog.com tutorials are really well written and free!

