CSS Problems, site looks crappy in Mac

chanoc

macrumors 6502
Original poster
May 20, 2003
339
0
Anchorage, Alaska USA
I was wondering why my site looks fine in Windows using Firefox and IE, but not Firefox, IE and Safari for Mac. See site at bottom "Chanoc's Web site!".

The site is layed out in CSS 2.0 and XHTML. The css page is extention /chanoc.css. Thanks for any suggestions. :)
 

Littleodie914

macrumors 68000
Jun 9, 2004
1,813
7
Rochester, NY
Hmm... I can't tell you exactly what's wrong without dissecting the code, but make sure you have the margin-top set to "0px" for your div's containing the stuff that's not aligning right. You aren't using tables, so there shouldn't be any trouble with cellpadding/spacing.
 

Littleodie914

macrumors 68000
Jun 9, 2004
1,813
7
Rochester, NY
Ah, nevermind, figured it out. The problem lies within the classes you're creating in your chanoc.css file. For example, with the #left class that the navigation div, you have the position set to absolute, and then you're defining a custom distance from the top of the page. This will cause problems, as different browsers leave a different amount of space (a few pixels) from the top of the window before actually beginning the HTML. I'd suggest setting the positions to "position: relative;" and then working from there. It's much less problematic than setting exact coordinates. Good luck! ;)
 

chanoc

macrumors 6502
Original poster
May 20, 2003
339
0
Anchorage, Alaska USA
Thanks for the input, but even setting #left to relative did not solve it. Although most my visitors use Windows. I get a lot of hits from Latin America, where Macs are a novelity. Chanoc is my nickname given to me by Mexican friends, and also the name of a comic book character from Mexico.

Windows
3049
75.5 %

Macintosh
799
19.7 %

Unknown
164
4 %

Linux
26
0.6 %

Oh well, I am going to tweak, tweak, tweak that damn code until it looks good for the 20% of Mac users - including myself. :cool:
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,807
179
Bergen, Norway
One small thing: I used to have trouble with my css files when I added commentaries to more than one line... a simple /* comment or whatever */ after the cone on a single line worked fine, but when I tried:
/*
More lines
More commentaries
*/
...I got into trouble...

And, as said above: Both css and xhtml must validate. Start with the xhtml, then clean up your css...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.