Results 1 to 4 of 4

Thread: css for mac and pc

  1. #1
    Join Date
    Nov 2007

    css for mac and pc

    presently i am using the method from

    when i need to have a separate css file for windows and mac as sometimes i come across small differences with padding or margins and i have to fix these for mac and pc so i use the method from the above link and it works fine

    is this the best method or is there a better and efficient way where in i can have separate css files for a mac and pc

    please advice


  2. #2
    Join Date
    Aug 2006
    No, I certainly wouldn't say that's a good way. Frankly I've never even heard of a need to distinguish between OS for purposes of page layout. The differences in browser renderings (to my knowledge) are completely from the browser, not the OS.

    So step 1 is of course to try to get your code to render correctly on all browsers, without browser-specific tweaks. If you're having issues with margins and padding, make sure you start your css with the normal:
    * {margin:0;padding;0}
    since different browsers have different default margins and padding. This will set the both to zero, requiring you to set your own values.

    Secondly, and only if absolutely necessary (I haven't had a need in a couple years), you can use conditional comments (see http://www.positioniseverything.net/...s/cc-plus.html for an example) to either have individual styles that are different for IE from everyone else, or even complete stylesheets different for IE.


  3. #3
    Join Date
    Mar 2010
    Quote Originally Posted by tracknut View Post
    Frankly I've never even heard of a need to distinguish between OS for purposes of page layout.
    Sadly, it happens. We test our site on many different browsers, and between mac and "windows" (please don't use "pc" to describe only windows...). And we found there are slight differences between the browsers, in particular firefox for windows and mac. Though admittedly they were never large enough of a problem to care. I certainly wouldn't recommend trying a javascript hack to fix them, unless they're major issues, and even then i'd recommend reworking the css then.

  4. #4
    Join Date
    Nov 2012

    Reason of Variations

    Kearning (sp?) on the PC and Mac is different for some specialize font. This creates the size discrepancy as most of these sizes are based on the size of a character which includes its kearning.

    Machine specific selectors would be a nice addition to the CSS standard.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center