Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Support for CSS in Safari

Hi,

Is CSS support in Safari buggy?

My web pages use CSS to position divs.
They work fine in other bowsers, compliant or not- Firefox, Internet Explorer 7 on Windows PCs, Netscape, etc but not Safari!

The pages validate to W3C standards for both CSS and XHTML (Strict).

Here's an example page to demonstrate the issue.
http://www.runninghead.com/aaa_Templates/centeringTemplate2.html
The content should center vertically and horizontally, yet does not go off screen when you resize the browser window.

I'm using Safari 2.0.4 on Mac OS 10.4.9

Please forgive the extensive commentary in the source code- the page is designed to teach a buddy how to write a web-page using all the modern methods.

iMac G5, Mac OS X (10.4.9), minimal RAM (512MB) installed

Posted on May 15, 2007 3:04 AM

Reply
4 replies

May 24, 2007 2:29 PM in response to tomb

I have found that Safari renders CSS styles very unreliably and unsatisfactorily. I believe the problem is not in stylesheet design or page markup... I feel the problem is Apple's.

Although my stylesheets are compliant to standard, and text styles are displayed correctly, Safari refuses to recognize most background properties in the sheet. Nothing I do works... although other browsers are fine with my stylesheets.

Since my site is related to my business and we are a mac-only plant, (everyone will be using safari to browse it), I have had to resort to the tedious process of copying styles from the sheet and pasting them into the head of each page, effectively defeating the whole stylesheet concept. (Pages display perfectly that way, btw).

I hope Apple addresses this issue soon.

May 24, 2007 3:37 PM in response to Denigo Tantric

Let me first say that Safari's renderer is one of the best in supporting common standards, such as (X)HTML & CSS 1 & 2. Of course there can always be a few bugs in the software. A webpage or stylesheet can be validated, but sometimes logics are a bit weird and so it is possible that pages don't render as you think they should be.

@Denigo Tantric: Could you please publish your website here if possible, so people can look into it and tell you what is wrong.

If you are still suffering from issues with Safari, please try a nightly of Safari's WebKit renderer. This renderer is by far superior to all other current renderers and is also faster and supports more new features. The WebKit nightly will fix the issues reported by user tomb.

May 27, 2007 8:18 AM in response to MysteryQuest

Interesting.
I can confirm that there are no issues per se with my code, which is minimal, fairly elegant and robust, though it does take an unusual approach to common problems arising from vertical centering.
I suspect that this causes the issue, though it shouldn't, and doesn't in every other browser.

Some aspects relating to layout are missing from the W3C spec, so matters of interpretation between browsers come in there. To my knowledge though the positioning methods I've used are in the spec and so not due to interpretational differences.

The issue is with Safari, which is not quite so standards compliant as, say, Firefox.

If any one can tell me the specific cause of this issue and/or a fix I'd love to hear of it.

@MysteryQuest
Kudos for the tech fix re: nightly.
Now if I can just get every Safari user viewing my pages to tinker with their browser when they come to my site there'll be no problems, right? hmmm... 😉
Seriously though, sincere thanks for the help and if you've time to expand on this topic I'm all ears.
Have downloaded WebKit nightly but not found info on it yet so have held off install- anything further you might add on the subject of what it is and how it effects changes would be great.

Support for CSS in Safari

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.