Click to See Complete Forum and Search --> : Table Borders


ldoodle
05-26-2005, 08:31 AM
Hi there,

I've got 2 classes... one called tblNormal, and another called tblHover. The tblNormal is applied to some <TD>'s, and tblHover is used in an onMouseOver event, which changes the background colour, and puts a border round the <TD>. The problem I have is that when you hover over the <TD> it pushes everything along by 1 pixel, as it's adding a border round it. I can put a border on the tblNormal class, but i'm using the DXTransform.Microsoft.Gradient filter on them, which means whatever static color border I put on the tblNormal class, it will show!

Is there a way I can specify a hidden 1px border on the tblNormal class, or another way of accomplishing my goal?

Thanks very much

DaveSW
05-26-2005, 09:54 AM
padding?
e.g. in CSS
padding-left: 1px;

NogDog
05-26-2005, 11:20 AM
padding?
e.g. in CSS
padding-left: 1px;
That's what I do for that sort of thing: reduce the padding by the amount of the border's width:

.class { padding: 2px 4px; }
.class:hover { padding: 1px 3px; border: solid 1px black; }