Safari CSS filter

Styling forms is always an interesting task. Just check out how the different browsers like to display the form elements. Today I was having a little problem with the input element margins in Safari, among others. I was about to ignore the 2 pixels, but decided to give Google a shot, which immediately brought up a post from the CSS hacks series by a busy coder and blogger by the name of BTreeHugger.

Allthough I have Firefox as my main browser, most Mac-users stick to the default Safari, these are the two alternative mentioned, I used the former:

html[xmlns*=""] body:last-child ... { ... }
body:last-child:not(:root:root) ... { ... }


2 responses to “Safari CSS filter

  1. it doen’t seems to work correctly.
    it also affects IE7 and disabling the *+html hack for it.. so now there is a IE7 bug instead of a safari

  2. I’m testing the html[xmlns*=""] body:last-child #foo { bar } now, and I can’t seem to reproduce your problems. It works fine in Safari 2 on Mac. But it doesn’t affect Safari 3 beta for Windows. And it’s not disabling the *+html IE7 hack for me.
    However, I recommend using Conditional Comments for the IE browsers.