r1 - 30 Jan 2006 - 21:15:15 - ArneJohannessenYou are here: TWiki >  ICab Web > UnofficialFAQ > ICab2CSSProblems

iCab 2 CSS problems

There are lots of known problems with the rendering of Web pages that use CSS (Cascading Style Sheets). They usually are the reason why your pages are all over the place.

History of CSS support in iCab 2

These problems are due to the fact that iCab 2 (and earlier) has been using an HTML tag-soup parser as main part of it's rendering engine. Historically, prior to iCab 2.5, web pages were displayed based on HTML rules only. Complex layouts were (wrongly) implemented using TABLEs. Everything was nice and simple. (Well, that depends on who you ask, actually.)

iCab 2.5 to 2.9 implement parts of CSS Level 1 (and even some parts of higher levels). It apparently does so by retrofitting the CSS styles back into it's tag-soup parser. This generally works extremely well for the sort of thing you'd use FONT elements and the like for in HTML. It is a complete disaster when complex layouts with lots of margins or non-static positioning come into play.

Working around the problems

iCab 3 has an all-new CSS and HTML parser than can handle just about any CSS thrown at it beatifully. It has is one of the best (if not the best) CSS rendering engines available on any platform. Upgrading to iCab 3 will almost certainly solve all iCab 2 CSS problems.

Outside of upgrading to iCab 3, there is not much you can do about the presentational issues as a user except trying to disable CSS. Unfortunately, iCab 2 doesn't allow this via the Filter Manager, so you have to do it globally in iCab -> Preferences -> Style Sheets -> Use Style Sheets.

If you do this, keep in mind that while some pages look better without style sheets, others might look better with style sheets. Having said that, every Web page that is well-written is usable without CSS. Style sheets are supposed to be only about presentation, not about behaviour.

Hiding CSS from iCab 2

It's generally best for Web authors to avoid using advanced CSS 2 with iCab 2 at all. A complete account of what CSS properties are supported (and indeed even how well they are supported!) can be found in the detailled changelogs of the iCab beta versions, which are available in the files section on the ICabYahooGroup (and per e-mail on request therein).

iCab 2 has a bug in it's tag-soup parser that can be used to stop CSS from being read by iCab 2. This method (a CSS hack, really) has been confirmed by the iCab developer as a valid method to hide CSS from the buggy iCab 2 parser (in fact, the developer uses this very method on the company Web site).

To hide CSS from iCab 2, use a TYPE attribute on your STYLE (or LINK) element that has a numeric entity reference in it. The TYPE attribute value of "text/css" is guaranteed to hide the CSS from all versions of iCab 2. There is no known other browser with the same bug.

(There is also no known method to hide CSS from iCab 3, but since iCab 3's CSS rendering engine is superb, there ought to be no need for this anyway.)

-- ArneJohannessen

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
risleynet
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback