![]() ![]() ![]() Netscape 4 will display a non-styled version of the site, as it can’t understand this directive. This can be achieved using the directive to call up the CSS document: url(cssfile.css) It’s become common practice nowadays to completely hide the CSS file from this browser. Making a CSS layout for this browser, whose market share has now slipped well below 1%, can be extremely challenging. Netscape 4 has limited and somewhat erratic support for CSS. The second CSS rule, which IE/Mac can’t see, displays this section. The first CSS rule hides the entire section assigned the noiemac id (i.e. To achieve this perfect look in all browsers, you could use the following two CSS rules: #header This gap might look good in IE, but in Firefox, Opera and Safari the gap is huge - you decide that a 10px gap looks far better. Say, for example, you want the space between a page’s header area and its content to total 25px in Internet Explorer. If you have two CSS rules with identical selectors, the second CSS rule will almost always take precedence. The way CSS hacks works is to send one CSS rule to the browser(s) you’re trying to trick, and a second CSS rule that overrides the first command to the other browsers. Fear not, though! As you learn more about CSS, you’ll gradually start to understand the different browser interpretations and realise that there aren’t really that many - and that, where necessary, their idiosyncrasies can be catered to using various workarounds or hacks. The problem that remains is that browsers can sometimes interpret CSS commands in different ways, which fact alone causes many developers to throw their arms up in the air and switch back to pixel-perfect table layouts. This is no longer the case, as version 5 browsers, which all provide good support for CSS, now account for over 99% of the browsers in use. Historically, the main problem with using CSS has been a lack of browser support. And, given the many benefits of using CSS, such as quicker download time, improved accessibility and easier site management, why not? The Problem with CSS More and more Web developers are ditching tables and coming round to the idea of using CSS to control the layouts of sites. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |