Help - Search - Members - Calendar
Full Version: rollovers
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
tommyhottie
how do I get a link to change its background color like this:


click to enlarge

what is the css or html code to do this?
Marlons
Do you mean like this?
http://www.createblog.com/layouts/preview.php?id=26417
And are we talking about myspace or websites?
tommyhottie
yeah!
its for a website
miyashu
i always found it easier to work with tables for this. you can customize the link attributes & the widths of the table data cells to your liking:

CODE
<table border="0">
<tr>
<td width="20"></td>
<td width="150" valign="top">
<span class="navi">text</span>
<span class="link"><a href="#">title here</a></span>
<span class="link"><a href="#">title here</a></span>
<span class="link"><a href="#">title here</a></span>
</td>


and here's what you would put in your css:

CODE
.link {
font-family: verdana, sans-serif;
font-size: 12px;
color: #000000;
line-height: 14px;
text-transform: uppercase;
background-color: #ffffff;
display: block;}

.link a:hover {
color: #ffffff;
text-decoration: none;
display: block;
background-color: #000000;}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.