GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CSS Conditional Comment for Opera (https://gfy.com/showthread.php?t=966414)

Cyber Fucker 05-02-2010 03:27 PM

CSS Conditional Comment for Opera
 
I'm trying to force Opera 9 and earlier versions of this browser to accept conditional css stylesheets but it won't listen to me. :(

For example for IE6 I use:

Code:

<!--[if IE 6]><link rel="stylesheet" href="css/IE60Fixes.css" type="text/css" media="screen" /><![endif]-->
And IE does this style sheet but Opera won't listen to analogical comment:

Code:

<!--[if Opera 9]><link rel="stylesheet" href="css/Opera9Fixes.css" type="text/css" media="screen" /><![endif]-->

How to force this bitch to listen to my comments? :helpme

mikke 05-02-2010 03:42 PM

try

Code:

<!--[if Opera]><link rel="stylesheet" href="css/Opera9Fixes.css" type="text/css" media="screen" /><![endif]-->

Cyber Fucker 05-05-2010 11:21 AM

still not work, bump

SCORE Ralph 05-05-2010 11:40 AM

Conditional comments are for IE5+ on Windows systems only. It's not supported by other browsers as its something developed for/by IE.

BestXXXPorn 05-05-2010 11:51 AM

What I recommend doing is just reading the browser's agent string in PHP or some other server side scripting you may be using...

Then echo/print out the css include tag only if it matches your required parameters.

$_SERVER['HTTP_USER_AGENT']

LoveSandra 05-05-2010 01:45 PM

bump bump

harvey 05-05-2010 01:49 PM

Quote:

Originally Posted by Cyber Fucker (Post 17096474)
I'm trying to force Opera 9 and earlier versions of this browser to accept conditional css stylesheets but it won't listen to me. :(

For example for IE6 I use:

Code:

<!--[if IE 6]><link rel="stylesheet" href="css/IE60Fixes.css" type="text/css" media="screen" /><![endif]-->
And IE does this style sheet but Opera won't listen to analogical comment:

Code:

<!--[if Opera 9]><link rel="stylesheet" href="css/Opera9Fixes.css" type="text/css" media="screen" /><![endif]-->

How to force this bitch to listen to my comments? :helpme

I don't know what are you trying to do, but AFAIK Opera has to behave exactly the same than Chrome, FF and Safari, conditionals are for IE because it's a non-compliant browser

Deej 05-05-2010 01:53 PM

IE is the retarded older brother... nuff said...

Cyber Fucker 05-12-2010 11:52 AM

Quote:

Originally Posted by BestXXXPorn (Post 17110090)
What I recommend doing is just reading the browser's agent string in PHP or some other server side scripting you may be using...

Then echo/print out the css include tag only if it matches your required parameters.

$_SERVER['HTTP_USER_AGENT']

Thank you for the suggestion man! I did it similarly to your advice. I built JavaScript to detect the browser and to replace css style sheet, and it works! At least when JavaScript is enabled. :thumbsup

The Truth Hurts 05-12-2010 12:00 PM

Code:

@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari-Opera specific declarations here */
}

saw this somewhere.. try it.


All times are GMT -7. The time now is 06:28 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123