Log in

View Full Version : PB link and img in cells : FF adds 3px height



christopheL
05-22-2008, 09:35 AM
Hello,

I use links in some cells of a data table with a mouseover effect to highlight the cell.
It works well for FF et IE6 when text is used for links.

Now I begun to use, sometimes, .png for a link.
The png's height fit on a table line for IE6.
But for FF it does not work properly : the height of the png is 2 or 3px more a the bottom. So the heigh of the table line is greater for those lines with an img as links.
I tried to change the css but no way.

I do not understand why. :confused:
Something is missing in my css file ?

Christophe

The css to highlight cells :
table.datatable td a {
display: block;
text-decoration: none; }
table.datatable td a:link {
text-decoration:none;
color: #004080; }
table.datatable td a:hover {
text-decoration:none;
background-color:#E8D0A9;
color: #004080; }

For img :
img { border: 0; }

Medyman
05-22-2008, 03:49 PM
Do you have a link to your page?

You could specify the height of the image and use overflow:hidden;

christopheL
05-23-2008, 01:42 PM
The page is in out intranet, so no link to.

I tried what you suggested, but it did not solve.

After many tries, I added :
table.datatable img { border: 0; vertical-align: top; }
Then it worked !

Christophe