Thanks to all. The only way to detect Android is javaSript. Media queries are not possible because they only use screen width and height and portview width and height.
Groeten, Marie-Ange -----Original Message----- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Thursday, September 03, 2015 2:41 PM To: DEMEULEMEESTER Marie-Ange Subject: Re: [css-d] css for Android only? Hi, If all you need to do is detect an Android device. This is what I use and it has proven very handy. It is javascript so I wont post to the board, but is a few lines of JS and doesn't hurt download speeds. <script type="text/javascript"> var nAgt = navigator.userAgent; var isMobile = { Android: function() { return nAgt.match(/Android/i) ? true : false; }, BlackBerry: function() { return nAgt.match(/BlackBerry/i) ? true : false; }, iOS: function() { return nAgt.match(/iPhone|iPad|iPod/i) ? true : false; }, Windows: function() { return nAgt.match(/IEMobile/i) ? true : false; }, Symbian: function() { return nAgt.match(/SymbianOS/i) ? true : false; }, any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows() || isMobile.Symbian()); } }; if( isMobile.any() ) { location.href = "HTML5/index.html" ; } else { location.href = "FLASH/index.html" ; } </script> The reason it works is because the text Android will always be in the user agent string for an Android device. Wouldn't use it for redirecting to the login page, but for image swaps and layout adjustments, this works. Best, Karl DeSaulniers Design Drumm http://designdrumm.com On Sep 3, 2015, at 4:35 AM, "marie-ange.demeulemees...@bnpparibasfortis.com" <marie-ange.demeulemees...@bnpparibasfortis.com> wrote: > Hello, > Is there a way to use css that only works for Android devices? > In fact I have to hide the print button for Android devices only. > Thanks. > > Regards, > > Marie-Ange > > ====================================================== > BNP Paribas Fortis disclaimer: > http://www.bnpparibasfortis.com/e-mail-disclaimer.html > > BNP Paribas Fortis privacy policy: > http://www.bnpparibasfortis.com/privacy-policy.html > > ====================================================== > ______________________________________________________________________ > css-discuss [css-d@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/