Fire Dragon Posted March 8, 2006 Share Posted March 8, 2006 This is pretty easy question but how I can change link's color when mouse is over it?ONMOUSEOVER event comes first to my mind but then I must change every link's code.I also heard there is code what like automatically defines color change for all page's links.Is this kind code possible and is HTML or JS needed for it? Link to comment Share on other sites More sharing options...
pulpfiction Posted March 8, 2006 Share Posted March 8, 2006 Hi why is that you need HTML or JS, dont want to use CSS?this is how its done in css. it will work for all pages.a:hover { color: #F5F5F5; text-decoration: underline;} Link to comment Share on other sites More sharing options...
vchris Posted March 8, 2006 Share Posted March 8, 2006 You can change the color of all your links with This goes in an external style sheet without the <style> tags or within your html page. External stylesheet is recommended. <style type="text/css">a:link { color: #000000; text-decoration: none; }a:visited { color: #000000; text-decoration: none; }a:active { color: #000000; text-decoration: none; }a:hover { color: #000000; text-decoration: underline; }</style> a:hover is when your mouse is hovers over the link. text-decoration: underline means the link is underlined and none means no underline. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now