1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 hiding something just in mobile

Discussion in 'Styling and Customization Questions' started by AndreaMarucci, Jan 8, 2015.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    I've this div
    Schermata 2015-01-08 alle 18.15.03.png
    in my forum and I'd like to hide it but just in mobile. I know that there's surely a mean to do that inputting some code in extra.css but I don't know what.

    It's the code from an addon that show a live search and I don't want to show it in mobile.

    Can someone help me?

    Thanks!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If you just want to hide it, use a media query based on the browser width and display:none.

    The link in my signature explains how to use media queries.
     
  3. AndreaMarucci

    AndreaMarucci Well-Known Member

    Tried
    Code:
    @media (max-width:@maxResponsiveWideWidth){
      .livesearch {
      display:none;
      }
    }
    with no luck :-(
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Try using maxResponsiveNarrowWidth.

    You may also have to use !important.
     
  5. AndreaMarucci

    AndreaMarucci Well-Known Member

    Thanks Brogan, that way it worked
    Code:
    @media (max-width:@maxResponsiveNarrowWidth){
      .livesearch {
      display:none !important;
      }
    }
     

Share This Page