CSS Conditional Comment for Opera

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cyber Fucker
    Hmm
    • Sep 2005
    • 12642

    #1

    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?
  • mikke
    Confirmed User
    • Jan 2010
    • 1327

    #2
    try

    Code:
    <!--[if Opera]><link rel="stylesheet" href="css/Opera9Fixes.css" type="text/css" media="screen" /><![endif]-->
    icq: 395 294 346
    http://www.adultsubmitter.eu - submit any adult site to 20 directories from 1 form!
    now 20 domains!
    http://www.porndeals.eu http://www.ebonybangbros.com

    Comment

    • Cyber Fucker
      Hmm
      • Sep 2005
      • 12642

      #3
      still not work, bump

      Comment

      • SCORE Ralph
        Confirmed User
        • Mar 2003
        • 2090

        #4
        Conditional comments are for IE5+ on Windows systems only. It's not supported by other browsers as its something developed for/by IE.
        GetSCORECash.com | In the Biz Since 1991
        Big Tits | Granny & MILFs | Amateurs | Big Booty | Foot Fetish | BBW | Teens
        Hosted Embeds | MP4s | RSS Feeds | FHGs | Model Directory

        Comment

        • BestXXXPorn
          Confirmed User
          • Jun 2009
          • 2277

          #5
          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']
          Last edited by BestXXXPorn; 05-05-2010, 10:53 AM.
          ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

          Comment

          • LoveSandra
            So Fucking Banned
            • Aug 2008
            • 10551

            #6
            bump bump

            Comment

            • harvey
              Confirmed User
              • Jul 2001
              • 9266

              #7
              Originally posted by Cyber Fucker
              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?
              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
              This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth

              Comment

              • Deej
                I make pixels work
                • Jun 2005
                • 24386

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

                Deej's Designs n' What Not
                Hit me up for Design, CSS & Photo Retouching


                Icq#30096880

                Comment

                • Cyber Fucker
                  Hmm
                  • Sep 2005
                  • 12642

                  #9
                  Originally posted by BestXXXPorn
                  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.

                  Comment

                  • The Truth Hurts
                    Zph7YXfjMhg
                    • Nov 2002
                    • 15732

                    #10
                    Code:
                    @media screen and (-webkit-min-device-pixel-ratio:0) {
                    /* Safari-Opera specific declarations here */
                    }
                    saw this somewhere.. try it.

                    Comment

                    Working...