Re: Mac and PC differences

by Charles Walker <cewalker(at)kingston.net>

 Date:  Mon, 29 Apr 2002 11:07:24 -0400
 To:  martino(at)tntmag.co.uk
 Cc:  hwg-style(at)hwg.org
 In-Reply-To:  hwg
  todo: View Thread, Original
Hi Martin,

I don't have a direct answer to your question, but I do have a very useable workaround. If your hosting server supports PHP, you 
can insert a simple bit of PHP code which should do the trick.  First create two style sheets - one for Windows and one for the 
Mac. Then in the head of your document, insert code instructing the server's PHP parser to check the viewer's USER_AGENT, 
determine the platform being used, and deliver the appropriate style sheet.

I used this trick to solve a somewhat related problem - about one-third of the target audience of a Web site I'm maintaining is still 
back using Netscape 4, and I was very frustrated trying to implement CSS. My solution was to create PHP pages that delivered 
one style sheet to browsers version 5 and up, and a second style sheet to versions 4 and under. You can view the results (try 
using different browsers) at http://www.visionweaver.net/sydenham/index.php . If you're interested, I'm glad to share the PHP code, 
which of course isn't accessible otherwise.

Charlie Walker

---------------------------------------------------------------------

26/04/2002 7:12:52 AM, martino(at)tntmag.co.uk wrote:

>
>greetings
>
>i am re-designing my website using pure CSS but have come across a small but
>very irritating discrepancy between microsoft's browser on Mac and PC.
>
>on a Mac the placement of elements is slightly different, vertically they
>are all a few pixels lower (it seems) than on PC. since i develop on Mac and
>my audience is split 50/50 this is rather frustrating, i never see what i
>really want to see.
>
>my question is this: is there a way i can code one stylesheet and one page
>to have exactly the same layout on Mac and PC (IE5+) using
>
># divname {
>position: absolute;
>left: ypx;
>top npx;
>}
>
>as an exmaple:
>http://www.elemental.co.za/martin/
>
>at first i suspected it was my doctype, which it is not and then i thought
>it was maybe the discrepancy between Mac and PC and their handling of
>padding, margins and borders.
>
>i am at a loss. if anybody can tell me what my options are, please do since
>i feels like waiting fro godot trying to solve this minor issue.
>
>kind regards
>Martin Oelofse
>
>

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.