Forum Moderators: not2easy
div within an anchor as an anchor is an inline element. The HTML validator [validator.w3.org] will help you out here. You could try using a
span instead, or rework your markup completely. It appears you are building some sort of list, so an unordered list (<ul></ul>) may be the best choice. For the precise hover code can you post a short and relevant snippet of your CSS?
I would avoid using div's to apply classes to text and links, span's are highly recommended ;)
Try this:
<tr><td><a href="aa.php" class="">
<span class="tsblue">aaaa</span>
<span class="black2">aaaa</span>
<span class="purple">aaaaa</span></a>
</td></tr>
with this styling:
.tsblue {color:#4594DD; display:block;}
.black2 {color:#000; display:block;}
.purple {color:#503EAB; display:block;}
good luck!
span:Hover {
color: #CC3300;
}
Which of course doesn't work in IE6.
What you should do is get rid of the spans and add the classes to them instead. (Yes, I know, that's duplicating them.) Then apply the hover. Eg:
<tr><td>
<a href="aa.php" class="tsblue">aaaa</a>
<a href="aa.php" class="black2">aaaa</a>
<a href="aa.php" class="purple">aaaaa</a>
You can always make them 'display:block' to fall onto new lines.