thewriter Posted May 27, 2012 Report Posted May 27, 2012 Is it possible to use an a:hover to effect another link? For example: <a href="hover.com">Hover</a> <a href="hover.com">Blue</a> Would there be a way, to hover over the link "blue" and instead it would make the link "hover" change colors. If more explanation is needed, I can provide some in the morning. Any help would be great! Quote
Wickham Posted May 27, 2012 Report Posted May 27, 2012 You can change styles on visited, hover, active and focus link states compared with the default link state. Links or hyperlinks are made with this code:- <a href="introduction.html">Introduction</a> for a file in the same directory or like this for an external url:- <a href="http://www.your-domain.net/introduction.html">Introduction</a> Browsers have default link colors and a viewer may not have edited these or he may have changed his browser default settings to colors he prefers. You can make your webpage show colors that you want by using these styles either in a stylesheet or inside style tags in the page head section (note: you can leave some out so that default colors are used but the ones you state must be in the following order):- a:link { color: #de7007; } /*unvisited link orange*/ a:visited { color: #008080; } /*visited link teal*/ a:focus { color: #483d8b; } /*active link DarkSlateBlue/ a:hover { color: #996633; } /*hover link dark brown*/ a:active { color: #800080; } /*active link purple*/ Quote
thewriter Posted May 29, 2012 Author Report Posted May 29, 2012 You can change styles on visited, hover, active and focus link states compared with the default link state. Links or hyperlinks are made with this code:- <a href="introduction.html">Introduction</a> for a file in the same directory or like this for an external url:- <a href="http://www.your-domain.net/introduction.html">Introduction</a> Browsers have default link colors and a viewer may not have edited these or he may have changed his browser default settings to colors he prefers. You can make your webpage show colors that you want by using these styles either in a stylesheet or inside style tags in the page head section (note: you can leave some out so that default colors are used but the ones you state must be in the following order):- a:link { color: #de7007; } /*unvisited link orange*/ a:visited { color: #008080; } /*visited link teal*/ a:focus { color: #483d8b; } /*active link DarkSlateBlue/ a:hover { color: #996633; } /*hover link dark brown*/ a:active { color: #800080; } /*active link purple*/ Haha, uhm... you didn't really answer my question. But I appreciate the help. Quote
benjaminmorgan Posted May 29, 2012 Report Posted May 29, 2012 I'm sure you could do it with the jQuery add and remove class and hover function. I don't think there is a way to do it with just css. Quote
BuildMyWeb Posted May 30, 2012 Report Posted May 30, 2012 you would accomplish this with a simple bit of javascript Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.