Does anybody knows any Safari CSS Hack that actually works? It should be visible only by Safari. I know couple that you can hide some rules from Safari but I need one specific to target only Safari browser.
It's dirty, but you can target Safari like this with "::root". Think of it as "* html" for Safari. For instance, if you wanted to style all of your paragraphs red only in Safari, you can do this:
Parthiban, Have you had issues with it effecting your Firefox (Mac) preview? When I added the code you suggested, it worked! But, I went to retest in Firefox and noticed that it effected my positioning there as well. Thoughts?
in styles.css I have: #navigation {position:absolute; top:69px ;left:382px;} #main {position:absolute; left:568px; top:53px; width:423px} #featured2 {width:205px; position:absolute; top:33px; left:225px;}
in safari3.css I have: @media screen and (-webkit-min-device-pixel-ratio:0){
I've been having similar issues with CSS positioning with Mac Safari and Mac Firefox. All is well in Win IE, Firefox, Safari bit a few pixels off in Mac saf and FF. Did you get any further with this? I was trying to find a way to target the css just for those browsers and mac. If you could let me know I would appreciate it. Thanks
It was quite helpful.I would also like to add to this.Different browsers have their different ways of serving the web page content and may create problem while using some CSS properties to get a desired output. To avoid these kinds of problems there is are solutions which are called "CSS hacks" and which are also different for different browsers. Using CSS hack is not recommended as per the W3C validation rules but in some cases we have to use them to get our task done. I knew about CSS hack for IE, Firefox but I came across CSS hack for Safari which I was not aware of and as Safari is one of the mostly used browser in world so I think this information might help others as well to overcome from these kind of browser compatibility issues.