Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2009, 07:38 PM
Registered User
 
Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS targetting Safari Only

I had a spacing issue with an unordered list which I styled with CSS for my global navigation.

The navigation looked fine in all browsers, apart from Safari 3. To fix the problem a friend recommended this CSS hack:

Code:
    <style type="text/css">
   @media screen and (-webkit-min-device-pixel-ratio:0){
      #nav-wrap li a, #nav-wrap ul li li a { padding:0 12px; }
      #nav-wrap ul li:hover ul { width:146px; }
      
   }
   </style>
This resolved the extra spacing added by Safari 3. The trouble was the hack was picked up by Chrome as well. But with a few adjustments it didn't look too bad.

The issue I now have is I dont need this hack for Safari 4, as without the hack the site looks fine; However, the hack is still needed for Safari 3 but if I add it Safari 4 also picks up the hack code.

I was wondering if anyone had come up with a way of targeting CSS for certain versions of Safari?





Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS - editing the css style sheet doesn't take effect immediately sayo ASP.NET 3.5 Basics 6 March 13th, 2009 02:32 AM
javascript in safari arafat.eajaz Javascript 0 September 5th, 2008 02:06 AM
Rich's new CSS book: Beginning CSS 2nd Edition jminatel BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 June 15th, 2007 11:55 AM
tell about safari -n- konqueror anshul HTML Code Clinic 2 August 26th, 2004 09:32 PM
Safari Browser Larson HTML Code Clinic 0 February 11th, 2004 10:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.