• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Case-by-Case CSS Hiding

If creating and maintaining a separate CSS style sheet just to make Netscape 4.x browsers happy seems like overkill to you, you’re not alone. A growing number of developers are hiding rules from that browser on a case-by-case basis, all in one style sheet. The cool thing about this trick is that it has an added visual element to it, so the hidden styles are obvious even at a quick glance. Turns out that while all browsers ignore rules within a CSS-style comment (/*...*/), only Netscape 4.x continues to ignore those within a double or nested CSS comment. So this rule

#content {
font-size: 12px;
/*/*/
font-size: 100%;
/* */
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint