When you get down to it, no browser has good CSS 1 support, much less CSS 2. NS 4 as pointed out has a ton more bugs in CSS rendering as compared to IE5 or Opera. Save for the coupled JS/CSS thing, most of these bugs manifest themselves when you start using positioning features; in otherwords, I've typically found that using CSS to denote font changes, indenting, and other such features is not going to cause NS to blow up at you.

But my comment was more towards why one needs to browser detect anyway. Even if you browser detect correctly, and send off a CSS file for that browser, *my* user CSS that might specify Monospace 40pt where you have Sans Serif 10pt is going to most likely cause your entire page to render incorrectly particularly if you are using CSS to position elements rather than thinking of the items within the stream of text. As Corion states above, if you are looking for pixel-perfect placement , it's best to drop back to graphic files or flash or PDF to do this.

As Milly points out in another reply, a link near the top of the page for a non-CSS version (which simply doesn't need to send off a CSS file, as opposed to removing all CSS tags) is a very good solution that works in conjunction with having CSS pages without resorting to browser detection. If I come to a site with NS4 that had something like this, warning that "If the layout of this page is screwed up, try this version of this page", I would think this is just as good if not better than trying to guess the browser and play the same games here. And it would be much less work on the server too.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

In reply to Re: Re: Re: Identifying browsers by Masem
in thread Identifying browsers by Melly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.