CSS Trick
I’m building a user interface for a new contact book application at my day job and I’m using CSS for the whole thing, well, almost the whole thing. I have one table in there but it is used for the list of contacts so since that is tubular data, its ok.
I’ll keep my comments on browser inconsistencies to myself for now, but I have one little trick I thought I would share. For those situations where you have a slight difference from IE to Firefox, rather than using two completely different style sheets that pretty much contain the same thing you can just put two attributes in a style with the same name except, you start the second one with an underscore, see below;
- #container_contacts
- {
- left: 2em;
- _left: 5em;
- }
Firefox will read only the one without the underscore, IE will read both and since the underscore named one is second then it uses that one and you efectivley have two versions of the same style that ends up being browser specific.
Nothing earth shattering but I thought I would share in hopes that it might save someone else some time and frustration.