Need CSS Code to Hide/Disable a plugin on mobile devices

Discussion in 'CSS' started by Alanaj, Dec 3, 2012.

  1. #1
    Hi All,

    I have a WP tab plugin that works perfectly on my site. Unfortunately it's too big on mobile devices and doesn't retract when clicked. I've been trying a few different codes in the CSS to disable the plugin on mobiles but so far no luck. Any suggestions? I've tried these codes:

    /* Smartphones (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 320px)
    and (max-device-width : 480px) {
    #pullouts {
    display: none;
    }
    }
    /* Styles */

    /* Smartphones (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 320px)
    and (max-device-width : 480px) {
    }
    /* Styles */

    /* iPhone 4 ----------- */
    @media
    only screen and (-webkit-min-device-pixel-ratio : 1.5),
    only screen and (min-device-pixel-ratio : 1.5) {
    #pullouts {
    display: none;
    }
    }
    /* Styles */

    /* iPhone 4 ----------- */
    @media
    only screen and (-webkit-min-device-pixel-ratio : 1.5),
    only screen and (min-device-pixel-ratio : 1.5) {
    }
    /* Styles */


    NOTE: #pullouts is for the tab widget class/ID. Thanks in advance for any help.
     
    Last edited: Dec 3, 2012
    Alanaj, Dec 3, 2012 IP
  2. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Designing for both mobiles and large screens can be done by getting a javascript redirect to a different page optimised for mobiles.

    Even so, Wordpress has plugins for mobiles. That is what I would use instead of working on the CSS.
     
    Blue Star Ent., Dec 3, 2012 IP
  3. Alanaj

    Alanaj Active Member

    Messages:
    108
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Thanks Blue Star. I have WPTouch installed on the site. The paid version allows 3rd party plugin exclusion. My free version doesn't offer this feature :( I was searching for another plugin that would allow me to disable the slide out tab plugin on/through? the WPTouch plugin but no luck there either.
     
    Alanaj, Dec 3, 2012 IP
  4. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #4

    You are welcome. Just taking a quick look at the code you provided, some of them have an extra unneeded curly bracket.

    There are at least ten mobile plugins listed on this page.


    You can download firebug and a firefox plugin to change the user agent if you want some tips on delving more into the code. Firebug is especially useful. Good luck.
     
    Blue Star Ent., Dec 4, 2012 IP