Hide description on mobile

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

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20672
    holini
    holini
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20676
    holini
    holini
    Participant
    You cannot access this content.
    #20679
    Ernest Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20680
    holini
    holini
    Participant
    You cannot access this content.
    #20682
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.