CSS Hacks and Filters - a full list?

  • goldschmidt
  • Born
  • Born
  • No Avatar
  • Joined: Mar 05, 2008
  • Posts: 2
  • Status: Offline

Post March 28th, 2008, 1:14 pm

Hi,

Is there any good reference out there that has a list of all the ways to hide CSS from certain browsers and the ways to show CSS only in certain browsers? I know a few of them (conditional statements for IE, the weird ::root thing with Safari, etc.). I just can't find a comprehensive recent list of things like: if you want to hide code from IE, do this; want to show code only to Firefox do this, etc. The last list I found was in a book from 2005, which doesn't include IE 7 or much of anything for Safari.

I understand that CSS hacks and filters are constantly changing and it's hard to find a good updated list, but the logo image on my website is off by one pixel on Safari browsers and Opera browsers, and is actually perfect on everything else. I'm hoping there's some workaround that's easier than redesigning my layout. Thanks!

-Andrew G
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 28th, 2008, 1:14 pm

  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Joined: Mar 12, 2007
  • Posts: 6228
  • Loc: South-Africa
  • Status: Offline

Post March 31st, 2008, 12:35 am

maybe just post the problem first ... I have never used hacks anywhere and all my sites work in all browsers so far ...
Let's leave all our *plum* where it is and go live in the jungle ...
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 10, 2004
  • Posts: 2194
  • Loc: Canada
  • Status: Offline

Post April 1st, 2008, 9:25 am

If you don't care about CSS validation you can use this line to only display in IE; it's good if you've got quite a few tables and need to tweak them 1 or 2 pixels for IE only.
There's other uses as well, such as aligning block elements, etc.

Code: [ Select ]
width: expression(document.body.clientWidth > 1 ? "10px": "auto");


Code: [ Select ]
width:

Your css selector. padding-bottom, height, etc.

Code: [ Select ]
expression(document.body.clientWidth > 1 ?

Your if statement. If I have to use something this is what I use, as the clients browser will always be larger than 1 pixel.

Code: [ Select ]
"0"

Your value. In this case, width: 10px;

Code: [ Select ]
: "auto");

The ending. Tells the browser to apply it via CSS.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 180 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.