Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

safari's lack of CSS support

Status
Not open for further replies.

jez

Programmer
Apr 24, 2001
370
VN
Can anyone confirm for me that despite its claims, Safari DOES NOT completely support CSS 1.0

I specifically mean adding a background-color property to a text input.

This is a basic property that should be available on all elements (according to the W3C).


That links says background-color is supported, but i have tested in Safari 1.2.3 on Mac OSX both with an inline style (declared with style= attribute) and with a class defined in the head section of the page.

I think Macs are quite good, but as a web developer, I am very dissapointed in Safari... its just a different set of issues to the nasty IE for Mac... but its not like you can code to the standards and expect it to work (as you can almost do with firefox now).


Thanks in advance.

Jez
 
I generally find Safari to handle CSS pretty well.

Though I can confirm that background-color property on a text input does not seem to work. At least not on the form I have just done.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
Yeah overall with standard compliant HTML and well formed CSS you can do most things for most people, (including Macs and Safari), but it would be really good if i didnt have to chase an answer like this, it should have been published on the Apple site linked above.

Thanks for confirming the problem at least, which is more than Apple have done so far.



Jez
 
Be aware that <input>s vary wildly in their appearance and in the CSS that different browsers will apply to them. See for a thorough survey.

The conclusion I'd draw is that it's not safe to rely on the CSS-styling of <input>s to deliver any important information (eg. a different background colour for required fields), and probably best not to style them at all.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Well the site I am just finishing is pure CSS/XHTML and it works in PC IE, FF, Moz, Opera, NS7 and in Mac IE 5.2, Safari and FF with no problem other than that background colour issue in Safari.
I was suprised about Mac IE.

Something is nagging at the back of my mind about this. A way to make it work. Some foible of the way in which you structure the style rule for Safari. If I can remember what it is then I will post the solution here.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
ChrisHunt - I saw that posting prior to starting work on the current project, and although i agree that operating systems apply their own styling to form controls (and especially XP), it should not override the style sheet of the site (IMO).

For example, if you wanted to use an image for a submit button and the operating system just made it into a normal submit button then the internet would be a very dull place, and such intervention by the OS would be deemed as unacceptable.

Also there is a balance to reached here and i think most OS's / browsers manage OK, and that is applying light styling on both sides... (OS and CSS), but Safari just ignores the styling i want which is a flaw in my opinion and as such should be published by Apple as such.

see
which shows how almost all browsers pay heed to the developers code, except Safari.

Finally (and i will end my rant after this), your point about not conveying important information through color stylings. That is basic accessibility, and not an issue here.
This is not about just making it work in an acceptable way its about making it work in the way it was designed to.
What i want to acheive is a HTML page that matches our designer's flat image, which the client has signed for.
My point is that through the use of standards compliant code (HTML and CSS) then i should be able to get pretty close to that design, and if the color scheme called for a slightly tinted input box (cos it looks nice) then who are Apple / Safari to claim they support CSS 1.0 when there are aspects of the implementation that blatantly dont.


end of rant...
 
I didn't say anything about whether or not browsers should support CSS styling of <input>s. I was just pointing out that, all too often, they don't.

So, from the point of view of the designer working in 2005 with the current set of browsers and platforms, don't rely on the styles that you specify always being applied. For the time being, you're going to have to treat such stylings as javascript - a nice-to-have for people that will see it, but not to be used for anything vital.

If you want to rant at Apple for their CSS implementation, go ahead (I wholly agree with you in fact), but it's not something we can deal with on this forum.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top