PDA

View Full Version : CSS 2 Support.


ionsurge
08-09-2003, 02:12 PM
Just wondering fellow peeps, would all browsers support CSS 2, e.g. Netscape, IE 5 etc?


Thanks all,



Ionsurge

SDP2006
08-09-2003, 04:35 PM
Probably not. My netscape 7.0 browser sometimes won't even support some of the most basic CSS 1

jkd
08-09-2003, 05:46 PM
Originally posted by SDP2006
Probably not. My netscape 7.0 browser sometimes won't even support some of the most basic CSS 1

On the contrary, Gecko-based browsers are leading the pack with CSS support, along with Opera 7. Mozilla supports pretty much all of CSS1, all of CSS2 except for counters, text-shadow, and cursor: url(), and supports a lot of CSS3.
Opera 7 is the same deal with CSS1, all of CSS2 except for text-shadow: and cursor: url(), but very little to no CSS3 to my knowledge. KHTML-based browsers are are about the same as Gecko, but buggier in some areas.
The latest Tasman engine on Mac has substantial support for just about everything.

IE/Win is the only thing holding back widespread CSS2 use, because it really doesn't have any of the useful additions that CSS2 brought.

theabyss
08-09-2003, 07:51 PM
IE/Win is the only thing holding back widespread CSS2 use, because it really doesn't have any of the useful additions that CSS2 brought.The lack of :hover support on any element is the thing I'm most frustrated with IE about :(

fredmv
08-09-2003, 08:45 PM
Just use JavaScript to emulate their effects.

redhead
08-09-2003, 09:12 PM
ionsurge, maybe you'll find this useful? Maybe you wont... I'm not quite sure how relavent it is:

http://devedge.netscape.com/library/xref/2003/css-support/css2/selectors.html

Just use JavaScript to emulate theit effects.heh heh! Unfortunately there's only so far you can go in implementing work-arounds left, right and centre for IE and other non-compliant (is that the right term to use?) browsers - in the end you have to draw the line.

fredmv
08-09-2003, 09:31 PM
I meant for things like this:


<input type="button" value="Hello, World" onmouseover="(this.style.backgroundColor)='#ffff00';" />


For non-Gecko browsers which don't support the :hover action, this will work fine in it.

redhead
08-09-2003, 09:39 PM
Yes I know, but now you'll find most are more hesitant to add work arounds where the browser is just behind the times. ie forward compatibility not backward... but this is going off topic... it's been discussed before though so methinks you should be able to find something :)

Sorry if I just kinda seemed like I was completely dissing your solution... just I wouldn't see it as a solution because it doesn't solve the problem of the browser not supporting it ;)

theabyss
08-09-2003, 09:54 PM
JavaScript itself is becoming severely outdated. Most actions can be done by the server or HTTP headers. There's not much of a need for it anymore. That's why I'm in the process of switching to XHTML Basic :p

brothercake
08-10-2003, 12:15 PM
It's selectors that bugs me - no direct descendent selector means you have to mess around to control cascading and specificity ... no attribute and sibling selectors means some styles are impossible without adding lots of classnames into the page.

With CSS2 selectors, you can style an entire page with no hard-coded ID or class attributes at all; that's worth having.

But here's a couple of things I did recently to make IE appear to support some things it doesn't:

- transparent borders - http://www.codingforums.com/showthread.php?s=&threadid=23823

- "max-width", but this one uses JS - http://www.codingforums.com/showthread.php?s=&threadid=24374

ionsurge
08-10-2003, 02:22 PM
Thanks for the input all, I'll use CSS1 and for other effects I'll just use js to detect the browser and redirect the user towards a stylesheet that adheres to what the browser supports.

:)

Vladdy
08-10-2003, 02:46 PM
I think I mentioned it before (could not find the thread), that I gave up trying to make one style sheet work in every browser. I found that having a browser specific stylesheet is much easier to develop. I start with mozilla and get things the way I want, then make a copy and start scaling down for IE. Opera needs few adjustments as well.
"Divide and conquer" works much better than "Stuffing 10 lbs. of crap in a 1 lbs. bag" :thumbsup:

For those interested in implementation:
<link rel="stylesheet" media="screen" type="text/css" href="Styles/screenCSS.asp" />
- browser sniffing is done server side and corresponding SS is send back.
- no need for @import hack
- masochistic souls can actually make a simple stylsheet for NN4.* :D :D

ionsurge
08-10-2003, 02:58 PM
/me pats vladdy on the head, and says, 'I was intending to do something along those lines, but your way seems better'.


Thanks vladdy.


:)

Vladdy
08-10-2003, 04:15 PM
Just don't forget to serve the server side response as "text/css" :thumbsup:

brothercake
08-10-2003, 05:37 PM
And don't forget to set cache-control to "private" - you don't want proxies caching those stylesheets.