Wednesday, May 26, 2004

I made a really interesting discovery regarding use of CSS selectors for changing the colors whenever the state in a anchor changes.

I originally had this:

#content table.place td img
{
width:60px;
height:60px;
border:0px solid #777777;
}

#content table.place td a img
{
width:60px;
height:60px;
border:1px solid #777777;
}


#content table.place a:hover img
{
border: #cccccc 1px solid;
}




But it didn't work in IE 5.5 properly. So I added this bit of extra code:

#content table.place td img
{
width:60px;
height:60px;
border:0px solid #777777;
}

#content table.place td a
{
border:0px solid #777777;
}


#content table.place td a:hover
{
border: #cccccc 0px solid;
}


This allows IE 5.5 to detect the state change while hiding the extra formatting needed
for the newer browsers.

Anyway, I'll see how this pans out...