This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Hide description on mobile

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Hide description on mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20672
    holiniholini
    Participant

    Hi

    What’s the easiest way to hide description (content) only on mobile devices?

    We would like to see only titles on mobile. I guess, the Custom CSS should be something like this that we can use:

    @media only screen and (max-width: 480px) {
    .asp-content {
    display: none !important;
    }
    }

    We know that “.asp-content” is not correct. What’s correct?

    Thank you in advance.

    #20674
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Custom CSS is the best option. Your code is almost correct, the ‘.asp_content’ is the class name. However instead of ‘display:none’ changing the text color to transparent is the way to go, as otherwise it will hide the whole result.

    @media only screen and (max-width: 480px) {
        .asp_content {
          color: rgba(0, 0, 0, 0) !important;
        }
    }

    This should hopefully do the trick.

    #20676
    holiniholini
    Participant

    You cannot access this content.

    #20679
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Maybe try something like this:

    @media only screen and (max-width: 480px) {
        .asp_content {
          color: rgba(0, 0, 0, 0) !important;
          font-size: 0px !important;
          line-height: 0px !important;
        }
        .asp_content>span.highlighted,
        .asp_content .etc {
             display: none;
         }
    }

    This should very likely get rid off white spaces as well.

    #20680
    holiniholini
    Participant

    You cannot access this content.

    #20682
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.