is there a database/wiki of browser/platform quirks and inconsistencies? - html

Often, even with a reset stylesheet, things will show up a little different from browser to browser, or on different platforms (especially with mobile).
I'm just wondering if there is any place that really breaks down quirks and differences between different browsers and platforms.
I've seen this for IE6.. which is great, but not the whole story! I've also seen a lot of lists of what is or isn't supported, but I've had less luck finding a place that lays out all the little niggly differences people have found.

For particular HTML, CSS and JavaScript features, the SitePoint Reference is very good.
Another similar resource is Quirksmode.org, "the prime source for browser compatibility information on the Internet".

Related

Why We need different CSS for different browsers specially in case of IE(diff for IE6, IE7, 8, 9)

I am just curious to know that why default css doesn't works for all the browsers, specially it breaks for IE browsers(6,7,8,9). So usually we need to create different css files for different browsers (mainly for IE), why is that?
Some browsers don't support all of the features CSS has to offer.
Also in some cases you need to "fine-tune" the css specially for IE because of the "css box model". You may also need it to enable backwards compatibility for previous versions.
I'm not a fan of creating browser specific CSS and usually try to use a solution that will work in all browsers. The reasons for some things not working in different browsers are:
bugs
different interpretation of styling
using something that was not implemented in the previous version
CSS is a big scary technology with no official implementation, only official specs. This means that there is no STANDARD interpreter that defines how the language is supposed to be interpreted, only docs which guide interpreter makers. The result is many interpreters, each with their own quirks and glitches.
...
And then there's IE
...
Microsoft has long held a firm foot in the "let's do it our way" ring. There have been many reasons for this ranging from implementing features that the WC3 CSS standards don't, yet, support (for example, they had a very early version of the modern opacity command) to more sinister reasons like trying to force compliance with their standard making niche appeal for their browser.
Either way, if you're going into web-dev, IE is going to be the bane of your existence. If you think CSS is bad, wait till you get to JS.
It is needed when you implement some feature of css which is not provided in all browser.
Then someone need various css files for fallback.
suppose you are using position:fixed; in css and if you want your site to be perfect in ie6 then you will need some other css file for callback because position:fixed; is not supported in ie6

Notes and guidelines to follow to support IE6

Are there any good notes and guidelines that one should think about when developing sites that must support Internet Explorer 6?
I'm not looking for explanations of the abundance of bugs that we have all learned by now. I need some general informations on, e.g., elements that one should prefer for certain tasks, things that simply does not work in IE6, CSS tips, etc.
here are the biggies i can think of right now:
No Alpha Transparent PNG Support
No Hover States except for the <a > tag
CSS floats behaving unexpectedly.
Can't use max/min width/height.
The Box-model conflict (padding is not added to the width of elements).
sometimes doubles margins.
IE6 doesn't support position: fixed.
...and i'm starting to get depressed so i'll stop here.
I'm fortunate in that I don't have to support IE6 any more. However it is a recent memory, so you have my sympathies.
Go to Quirksmode.org. This is an excellent resource for finding out what features various browsers support. (seeing all the red in the IE6 column will depress you though!)
If you plan to do any scripting at all, use jQuery rather than trying to work with plain Javascript: jQuery makes considerable efforts to be cross-browser compatible, even in IE6. It isn't 100%, but it makes a pretty good go at it, and give you features that would otherwise be completely impossible in IE6.
The following tools will make your life easier:
Dean Edwards' ie7.js - a JS library aimed at making IE6 more compatible with standards (he's also written "ie8.js" and "ie9.js" which extend the original ie7.js to add more features missing in various versions of IE)
Modernizr - a JS/CSS library aimed at helping you work around incompatibilities in old browsers.
IEPNGHack - allows you to use PNG graphics with transparency in IE6.
Whatever:Hover - allows you to use the :hover CSS style with any element type (IE6 normally only allows :hover for <a> tags).
CSS3Pie - a library aimed at giving IE6/7/8 some modern CSS3 features, including border radius.
There's probably more, but that should give you a start.
One thing to make clear to your employer though is that as long as they insist on using or supporting IE6, you will be unable to produce a modern feature-rich web site. There are limits to how good you'll be able to make it, even with all those hacks. Plus it'll be slow: IE6 is painfully slow at the best of times, and all those hacks will only make it slower.
Best of luck.
While simply saying "Don't Support IE6!" might sound real nice and easy to those who do not have to deal with reality, it remains a fact that many web developers/designers simply have no control whatsoever over that decision.
With that said, obviously the ideal would be "don't support ie6".
If you must support it, how much you have to support it depends on why you must; Is it because your web app is for a company which has many IE6 installations that it knows it won't be upgrading any time soon at all, or is it just for a client who wants to maintain 'support' for every possible user out there? Or is it something in between?
Generally speaking, I aim for "functional, non-totally-ugly, but certainly not pixel-perfect" appearance on IE6. I use IETester to check all versions of IE (differences abound between IE7 and IE8, for instance), so I include IE6 too, and just worry about making things look mostly functional for them.
For my clients, that has been sufficient. A couple have asked about IE6 support, and I have been able to show them that 1) the set of general users on the Internet who still use it is relatively small and 2) those users probably see so many glitches everywhere on the web anyway, they probably do not notice them anymore. I know that #2 probably sounds extremely dismissive, but I have plenty of anecdotal evidence that backs it up.
The basic idea comes down to; how much time will you really spend tweaking a site to make it perfect for an old, long-since-unsupported browser which use keeps going down more each day, when you could just make it acceptably functional, and then devote the rest of your time to more modern browsers.
But again, the extent to which you can take that route depends on how important IE6 support is to those who employ you, and why it is that important to them.
but anyway, IETester is a definite recommendation for testing it:
http://www.my-debugbar.com/wiki/IETester/HomePage
Poor you having to support IE6, we've all been there I guess...
Unfortunately I cannot point you to some general guidelines, besides the KISS principle (keep it simple stupid). Just stick to CSS 2.1 and don't use any fancy new technologies such as HTML5. Also don't even think of using any kind of special CSS selectors like blabla > blabla.
Let me point you to some sites which might help you in your endeavor:
CSS contents and browser compability (good overview of what to do and not to do with CSS)
ie6fixer (you actually WANT to use opacity, transparent png's? this tool will help you)
universal-ie6-css (good starting point for your custom css)
Ultimate IE6 Cheatsheet: How To Fix 25+ Internet Explorer 6 Bugs (fixing the shortcomings the manual way)
For testing I recommend setting up a small virtual machine (I'd suggest using windows xp) with IE6 running. Testing tools like IETester may use the engine of the particular browser, but I have had differences between a full blown IE6 and the IETester tools - oh also there is instant virtualization with Spoon.net browser sandboxes (they had to remove IE, because MS said so...).

How many external style-sheets are required for cross browser compatibility?

I have just started web development after a few years. Mostly in the past I would specify a style-sheet dedicated to IE6. Now, Chrome and Safari seem to be rendering elements better, over FireFox.
What is standard procedure for external style-sheets these days? IE6 (STILL?) - IE8? FF even?
It would be greatly appreciated if anyone has advice specifically catered to marketplace development, ie XHTML / Wordpress development.
There is no specified number of stylesheets. Usually it is one for IE and one for rest of the browsers. Note that there exist solutions such as ie7.js or CSS3 Pie to make IE behave like standard-compliant browser.
I personally use 2 stylesheets. One core one, and one for IE6.
Most of the modern browsers simply ignore anything that they don't support, and dont have quite the sheer number of behaviours that require hacks.
Given that a stylesheet isn't required at all, the answer is none. I would still say you need only 1 though. (If you've created your css properly and used a proper doctype). Technically you shouldn't need to have browser specific styles at all. And for the few times you might, you can use Star Hacks for IE...
I think question you're asking relates back to the much bigger topic of how best to handle cross-browser issues.
It's a wide and varied topic, but to help you with you're specific question about CSS branching (forking)... you may be interested in the following article from "A List Apart"
"Stop Forking with CSS3" http://www.alistapart.com/articles/stop-forking-with-css3/
Cheers.

HTML Standards and deviating browsers

This is a story anyone developing web applications is surely aware of - You create a site, which is well coded and elegant in the browser of your choice - until you run it in a different browser, which a lot of the time required hacking and slashing to create a functioning site.
I wish to enquire the techniques used by developers to ensure their code works well the first time around in the plethora of web browsers with all aspects related - such as :xhtml, html5, javascript, css, etc..
As a side note, what developers do about IE progress - with the majority of the world still on IE7, and IE9 only including new css and html standards how long do you think standard practice will(if ever) take to achieve?
I am quite interested in your response, as I cringe at the thought of cross browser compatibly issues.
My advice: Use a decent CSS reset or framework. Good CSS frameworks are: 960, Blueprint, YAML and YUI grids.
For your javascript you should use a library like: JQuery, mootools or Dojo. You will still have a few browser incompatibilities, but using any of these tools should fix about 90% of them.
Good luck! (ps: I use Mootools and Blueprint)
If you really want to have some fun with the IE6 crowd, try this: http://ie6update.com/
All kiding aside, with a strong understanding of box-model tactics, a great framework, plus quirksmode.org, you should have no reason to have to do a bunch of exotic hacks to make your site work. Design intelligently for standards that are viable today and save the bleeding edge techniques for demo sites. High-value corporate sites don't HAVE to be exotic, they need to be good and reliable. Otherwise, be willing to design parallel sites so that those who refuse to update can at least get by. Most of all, stick to the standards...a few W3 errors is too many.
Understand your audience too. I can't tell you how many designers do dark on dark and small fonts for older crowds. Likewise for using exotic javascript or worse flash where it's not appropriate. Solicit feedback from others....in reality, even if we "get" this game, we really only really understand our own preferences.
Practice progressive enhancement. For example, Jquery UI will round corners, but will gracefully degrade to square for the IE (behind) crowd. Consider using HTML 4.01 strict as opposed to XHTML because it is closer in syntax to the future, HTML5. (XHTML is no longer being advanced anyway)
Finally, test everything you do in multiple browsers or in a tool like Adobe's browser labs. Turn off Javascript and CSS...is the result acceptable? Run without flash...does your site work? How does it look on a mobile browser?
It's not a fun game to play sometimes, but it's what makes us professionals. Good luck!
I am developing for all major browsers out there (IE 6+, Firefox 3+, current Safari, Chrome, Opera 9.5+). My main advice to keeping code clean and eliminating extreme hacking sessions is the following: Test your page simultaneously in all Browsers. It is a lot easier to fix multiple small Problems than fixing a complete page in a single pass. Style issues are really easy to fix when working this way. JavaScript is a bit more challenging, but still much easier when working like this. jQuery often helps with this kind of problems. I include the new standards here and there but i am making sure, that graceful degration takes place. Standards compliant browsers get the full experience. Older ones get less eye candy while still delivering a working page.
Learn the standards.
Write code according to the standards.
Test the code in popular browsers, and see where it breaks.
“The standards” are HTML, CSS, JavaScript and the DOM. jQuery does a lot to smooth out JavaScript and DOM inconsistencies between browsers, and is a bit of a nicer interface to the DOM in my opinion.
“Popular browsers” at the time of writing are IE 6–8, Firefox 3, and the latest versions of Safari, Chrome and Opera. Safari and Chrome have hardly any differences as they use the same rendering engine, and Safari, Chrome, Opera and Firefox have very few differences as they’re all about the standards.
I cringe at the thought of cross browser compatibly issues.
They‘re really not that bad. (When you ignore IE. And its issues are at least reasonably Googleable when you encounter them.)
I think it is important you start with a good set of defaults and follow best practices, it is not much of a hassle to work with deviating browsers. I worked on http://html5boilerplate.com so we have a list of links up there (along with the actual boilerplate) that make a web developer's job much easier.

browser compatibility [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Typical pitfalls of cross-browser compatibility
Generally what are the main issues of browser compatibility come when we create a web page?
There's a million different things, but quirksmode.org is pretty comprehensive.
The main issuses can be divided into several categories.
Standards support
Each browser version supports a set of different standards up to a certain version, but there is usually some exceptions that are still not supported. A browser can for example support CSS up to version 2.1, except a few styles that are not supported.
Incorrect implementation
Although some standard is supported, it might not be correctly implemented. All browsers have had some problem like this from time to time, but Internet Explorer is known to have several well known problems that has survived more than one major version release.
Non-standard additions
Most browsers support some features that are not a standard yet, or simply an addition that will never be a standard. Notably Internet Explorer has plenty of non-standard features. A few of them has later been incorporated in a standard, but most of them will remain non-standard.
Variations within the standards
Although something is covered by a standard, it might not be strictly defined. Different browsers uses different solutions for what's not defined. How form fields look and act is one example of this. Although the basic operation is defined, they vary in function and appearence from browser to browser, and also depend on the operating system and it's settings.
System limitations
Different computers have different features available, which limits what a browser can do. The most common example is that different computers have different sets of fonts installed. Some fonts are almost always available, but which these are also varies depending on the operating system, so on any given system you can't be certain that any specific font exists.
Not that this is entirely helpful but IE 6
In more seriousness, the more complex things you try to do the more issues you will have, the simpler you keep your CSS and such the fewer problems you will run into.
I think that the main issue is related to the presentation of the web page. I tried to use CSS to give a style to the page but there were lots of problems to keep the page aligned between different browsers, and I tested only Internet Explorer, Firefox and Google Chrome.
This thing is more evident if you want to be compatible with older versions.