views:

41

answers:

1

How could I use separate stylesheet for Opera?

Like:

<![if !IE 6]>
<link rel=»stylesheet» type=»text/css» href=»ctyle.css» />
<![endif]>

But for Opera? (For all versions of Opera)

+3  A: 

I don't think you can without sniffing the user agent with server side code or JavaScript.

Besides the usual caveats of user agent sniffing, server side code would be more reliable as it wouldn't require JavaScript enabled.

There may also possibly be Opera specific hacks, but implementing these would be even worse than sniffing IMO.

If there are layout problems, I would Google the bug and see what solutions exist to fix. You may not even need a separate stylesheet.

alex