Hide slider in mobile view only

Discussion in 'Cloriato WordPress Theme' started by appleroad, Apr 6, 2014.

Thread Status:
Not open for further replies.
  1. appleroad

    appleroad Guest

    Joined:
    Apr 5, 2014
    Messages:
    13
    Likes Received:
    0
    Hello, Is there a way to hide the slider in the mobile view only?

    Alternatively, is there a way to display a correctly proportioned slider in mobile view if I change the slider dimensions on the main site as per this code found on a previous post?

    #slides .slide {
    height:450px;
    }

    #slides .slide img {
    height:450px;
    }
    #slides .slide iframe {
    height:450px;
    }

    I found that when I used this code the slider did not automatically resize in mobile view.

    Thanks!
     
  2. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,

    You can use code given below to adjust width and height of slider in the mobile view

    Code:
    @media only screen and (max-width: 480px){
    #slides .slide img {
    width: 292px;
    height: 107px;
    }}
    or to hide slider

    Paste this code in Custom CSS
    Appearance > Theme Option > Styling Option > Custom CSS

    Code:
    @media only screen and (max-width: 480px){
    #slides{
    display:none;
    }}
    Thanks & Regards
    Nitesh Raghuwanshi
     
  3. appleroad

    appleroad Guest

    Joined:
    Apr 5, 2014
    Messages:
    13
    Likes Received:
    0
    Excellent, thanks Nitesh!
     
Thread Status:
Not open for further replies.

Share This Page