Forum Moderators: not2easy
This is my first post here, so if the question has already been addressed, a simple link to the other thread will surfice.
Thanks
John
Opera from 5 on has little trouble with most CSS you'll make, same with mozilla/netscape since version 0.9 / 6.2, although there are some bugs here and there.
If you want to make sure your pages degrade to be viewable in all cases, just use this to include your css:
<style type="text/css">@import url(/css/your_css_file.css);</style>
replace /css/your_css_file.css with the path to your css files.
this will only run the css for modern browsers, IE 5 and greater, all opera, all mozillas, not netscape 4.
Viewers with older browsers will just get the straight html, black and white, which is better than they might be used to nowadays.
Netscape 4 has some trouble with much of CSS. IE 4 has little trouble with most CSS you'll use.
Netscape 4 and IE 4 alike have much trouble with most CSS you'll use... Unless you're only using CSS to change fonts, colors, and similar basic stuff.
Opera 5 and 6 have some really interesting bugs. Then there's IE (all versions) that can't seem to get anything right. Either there are severe box model problems, or there's little to no support for the most basic styles. ...not to mention all the little bugs that seem to haunt IE.
this will only run the css for modern browsers, IE 5 and greater
IE 4 actually picks that up too. If you want IE 4 to ignore the style sheet you'll need to call it without the url() statement...
@import "file.css"; Now, don't take all this as a sign that you shouldn't use CSS. Quite contrary! Use CSS! It is the most powerful way of getting a smashing layout without sacrificing usability or crisp text. It just takes some hands-on knowledge of the how-tos. If at first you don't succeed -- don't give up! CSS is easy to learn, but hard to master.
Netscape 4 and IE 4 alike have much trouble with most CSS you'll use.
I'm actually always amazed at how much of my css ie 4 runs, pretty much all of it except right and bottom positioning.
Thanks for the correction on the url thing drdoc.
For real world, beginner purposes though, all the browsers out there, with the exception of ns 4, will probably give you results quite close to what you are looking for.
don't give up! CSS is easy to learn, but hard to master.
Yea,I feel like Johnny Cash and "The Ring of Fire". I go down, down, down and the flames get higher. Seriously I'm 100% committed to CSS, but this bug and hack stuff to be cross browser compatible is making me a little nuts. I'm a perfectionist having trouble with all these compatibility issues. There was a state of bliss when the object was simply to make IE6 happy, which is 95% of our target, but now that my mind is open it is tougher. Thanks to this forum I'll make it though.
I disagree about IE4 running most CSS. Take this extremely simple code as an example:
<html>
<head>
<title>Untitled</title>
<style type="text/css">
p {
float: right;
margin-right: 20px;
}
</style>
</head>
<body>
<p>IE4 test page</p>
</body>
</html>
Or why not:
<html>
<head>
<title>Untitled</title>
<style type="text/css">
div {
display: inline;
}
</style>
</head>
<body>
<div>IE4 test page</div><div>Foobar</div>
</body>
</html>
Aside from the behaviors you pointed out, bad display: ; support, I've found it to be quite good.
It does do amazingly well however on everything else. That browser was really quite an achievement for its time, as was IE 5, amazing what real competition did for MS and browsers.
Another annoying one I've just found is that IE 5x mac also doesn't handle float right properties correctly, major page breakups, that's unfortunate to put it mildly.
In general any right behaviors seemed to be the most difficult to implement, nowadays the main difficulty seems to be getting overflow:auto to actually work as intended, scrollable with mousewheel on mouseover. That seems to be very difficult for the current generation of non IE windows browsers to handle.
What's interesting is that IE 4 actually had that feature working as well as Opera, Safari, and Mozilla have it working today, scrollable only by manual movement of scrollbar (except firebird0.7, which did have that working, broke on 0.8 too bad...).
display is not acceptable. ...especially in combination with buggy-to-nonexisting support for
right positioning. That makes it almost impossble to create fluid layouts that would work well in IE4. Besides, why go through the headache and hassle of creating something that works in IE4 when no one hardly uses it? IE4 is right down there next to NN4 with less than 1% overall usage. Your pages will sooner or later break in IE4... or else you'll be forced to create a tag soup of div tags (which is hardly a step forward from a table based layout).
Either stick to table based layouts, or give IE4 and NN4 users an unstyled page. At least you know it will be usable for them.
Netscape 4's annoying refusal to vanish completely still gets to me. I just took a look at some site stats, I think about 1/2 the ns 4 numbers, give or take, come from old Macs, which will probably not go away in the near future.
If I am reading this correct, then, the correct syntax for allowing older browsers to ignore the stylesheet would be;
<style type="text/css">@import "file.css"; </style>
I think I'll have to experiment on my own site with it before I commit to using it for other people's though. Thanks again for your help.
Best Regards
John