Help - Search - Members - Calendar
Full Version: Changing link color of text in table
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
pk941
I am trying to create a menu for a site using a table to layout the "buttons". The table will have an image as a background. What I would like to do is change the color of the text in the table with a 'hover' or "mouseover' without affecting any other links on the page. I can't seem to get anything to work. I am not the best of coders so any help would greatly appreciated.

Thanks
pk
Tom H.
See the FAQ section of this site: http://htmlhelp.com/faq/html/links.html#link-2color
pk941
QUOTE(Tom H. @ Aug 19 2008, 04:09 PM) *

See the FAQ section of this site: http://htmlhelp.com/faq/html/links.html#link-2color





Thanks Tom

pk
Hefty
Hi Pk, what you want to do is give your table an id and add css to that. I will give you a quick example.

CODE
<div id="menu">
<table border="1">
<tr>
<td>
<a href="#">Home</a>
</td>
</tr>
</table>
</div>


Now for the CSS to make the link have a hover effect. For example: bold.
CODE

#menu a:hover {
font-weight: bold;
}


Hope this helps, get back to me. Cw.Riess@gmail.com
Darin McGrew
For what you've done, you can get rid of the div completely and put the id="menu" attribute on the table itself, like this:
CODE
<table border="1" id="menu">
<tr>
<td>
<a href="#">Home</a>
</td>
</tr>
</table>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.