HTML and CSS Reference
In-Depth Information
everything before us, we had nothing before us, we were all going direct to
Heaven, we were all going direct the other way--in short, the period was so
far like the present period, that some of its noisiest authorities insisted
on its being received, for good or for evil, in the superlative degree of
comparison only. </p>
</div>
</div>
</body>
</html>
CSS is simply a much more powerful presentation technology than markup.
O NLINE http://htmlref.com/ch4/csspower.html
Cross-Browser CSS Madness
While CSS is certainly more powerful than markup for presentation, it does have its
problems. The browser vendors have made Web designer's lives miserable for years with
inconsistent, incomplete, and often downright buggy or even broken implementations of
the CSS specification. Things are changing but the required workarounds for now live on.
Earlier in the chapter, we saw purposeful browser errors being used to load other styles.
We might also use other techniques to load different styles to address different browsers. For
example, we could employ Internet Explorer's proprietary conditional comment technology
to load another style sheet for a specific browser,
<link rel="stylesheet" href="standard.css" media="screen">
<!-- pull nasty IE 6 hacking style sheet -->
<!--[if IE 6]>
<link rel="stylesheet" href="ie6.css" media="screen">
<![endif]-->
or maybe pull in a style sheet for all Internet Explorer versions previous to the nearly
standards-compliant Internet Explorer 8:
<link rel="stylesheet" href="standard.css" media="screen">
<!-- pull older IE style sheet -->
<!--[if lt IE 8]>
<link rel="stylesheet" href="oldie.css" media="screen">
<![endif]-->
Conditional comments are unique to Internet Explorer, which really isn't a problem since
it is usually the browser we desire to “fix” CSS wise. However, if conditional comments
aren't to your liking, you could also employ simple JavaScript to read the type of browser in
play and include a style sheet as well. We'll discuss these techniques and others throughout
the topic. Our only point here is to stress that the headaches with making CSS work similarly
across browsers are significant and ongoing.
Myths and Misconceptions Related to CSS
Just like markup, CSS is ripe with myths and misconceptions. There is no doubt in the
author's mind that CSS is the way to go. However, there is plenty of doubt about some of the
statements some CSS zealots make in regard to the technology. A few of the more common
Search WWH ::




Custom Search