If the browser doesn't support CSS, then it's going to ignore the order not to display, and it's going to show up.
If you're going to go to the trouble of doing server-side browser detection (which I _really_ _really_ don't recommend, it's better to degrade gracefully than to intentionally give them lower quality because of some string that they send you), then you could just not send the block, rather than embedding it in a comment.
And as odd as this sounds -- if a browser correctly parses SGML comments, then <!-- <!-- blah --> --> will not show anything through to the user. (as when there's a '--' within a comment declaration, it's not supposed to end when it sees the close. It's only supposed to close if there's a even number of '--' pairs. (unfortunately, most people don't know this rule, and do things like use 'i--' in javascript), so browsers tend to incorrectly parse SGML comments intentionally.)
In reply to Re^2: (OT) How to hide DIV contents from incompatible browsers?
by jhourcle
in thread (OT) How to hide DIV contents from incompatible browsers?
by TedPride
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |