Krishna Thota Krishna Thota - 26 days ago 6
ASP.NET (C#) Question

Anchor tag height not fitting in TD

I'm using tree view to populate rows in my webpage.
In html this is rendered as tables and anchor tags. The top edge and bottom edges are not being selected on hover (i.e. if we place mouse on the top edge of a item the anchor tag has no hover.

problem-
when I hover on Image, then anchor tag is not selected.

problem- I need edges to be covered by

<a>
.

http://jsfiddle.net/krishnathota/tGWsH/


  1. I need edges to be covered by
    <a>
    .

  2. I need color of the
    <a>
    anchor tag text to be changed when the mouse is hovered on the image.



Actually I have copied the pageSource from browser into the fiddle.
If you wish I wil give the treeview code.

Can you help me in achieving this?

Answer Source

Is that what you want?

Demo

You need to add another class by extending CSS.

So I have something to show you how-

Added on anchor-

.anchor-back
{
    background:#98bf26;
    color:white;
}

Javascript-

$('a').hover(function(){
    $('a').removeClass('anchor-back');
    $(this).addClass('anchor-back');

});

I hope you will get an idea from here.