Previous Message
Next Message

Re: [css-d] CSS Browser Sniffer?

Sent by Al Sparber on 26 January 2002 13:01

----- Original Message -----
From: "Adam Bell" [EMAIL-REMOVED]>
Sent: Saturday, January 26, 2002 1:27 PM
Subject: [css-d] CSS Browser Sniffer?

> First off, since this is my first post to the list I'd like to take a
> and thank Eric for starting this puppy up.
> Secondly, I'm having a major problem with a new site I'm developing. The
> problem all seems to lie in how IE/Mac and NS6 handles the page's
> It all resolves in this one tag in CSS.
> td img {
>     display: block;
> }
> Now this is to counter the NS bug with extra space with images in tables.
> OK, that solved that but in IE5.1/Mac it takes all those same images and
> aligns them to the left whether you want it that way or not!


Hi Adam,

Try changing td img {display: block;} to:

td > img {display: block;}

Eric and I met for dinner one day. He gave me that little rule, I picked up
the tab. It was the best deal I've made all year :-). Seriously, it seems to
work for me Adam. And it's not necessarily a bug, but probably more a very
strict interpretation of the CSS2 specification. The fact that MS and Opera
chose to be more forgiving, makes it stand out more :-)

You can also try setting line-height to, say, 1px on the affected <td>. But
the display:block fix should work. If the page is complex, make a simple
test page to check things out.

Previous Message
Next Message

Possibly related: