Dear All,
I've just joined this list, so I hope I'm posting this in the right place.
I'm a webmaster, and I want to make sure that my site works properly in
all browsers including dillo. However, some of the new code (*) in my
site relies on CSS properties such as display:none and does not
gracefully degrade.
If a browser has no CSS support, the newest stuff breaks in a very ugly
manner, whereas most of the CSS I've written to date fails gracefully
(we don't really care if some text-colour is wrong).
So my question is, how can I detect CSS support server-side?
I don't need to know precise details of the CSS-support; I just want a
simple yes/no. So Netscape 4.6 would be "yes", whereas Dillo 0.8, and
links/lynx/w3m/googlebot would be "no".
I don't want to do it by user-agent sniffing, and, if at all possible, I
don't want to rely on javascript (there are plenty of people who have
CSS-capable browsers with JS turned off).
I've had no luck from google, so I thought I'd ask here, as you'll know
the best way to do this.
Thank you for your help,
Regards,
Richard
(*) for example, I display HTML tooltips like this:
span.tool { position: relative; cursor: help; }
span.tool span.tip { display: none;}
span.tool:hover span.tip { display: block; z-index: 100; position:
absolute; top: 1.6em; left: 0; width: auto; padding: 6px; border: #F00;}
<span class='tool'>this is the link
<span class='tip'>Here is some <b>html</b> for the tooltip
</span>
</span>
i.e. the tool.tip is normally hidden by display:none, but is displayed
as result of the hover action.
If a browser doesn't support the CSS display:none property, that will
render in a very ugly way, with the tooltip contents displayed inline.
So I want to have a way to fall-back (server-side) to:
<span title='this is the tooltip, without html'>this is the link
</span>
My intention is to do this server-side, using a session-variable after
testing whether the client supports CSS. But how?