Compact Mode In Responsive

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Compact Mode In Responsive

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11471
    mverrastro
    mverrastro
    Participant

    Hi, is there any way to make the search box compact when responsive? I mean the search box change to compact mode when the display is less than 992px

    #11502
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sorry for the delay!

    It’s not possible unfortunately. The compact mode is affected by javascript as well, so some custom CSS would not do the trick here.

    One thing you can do is to create two search instances (1st as regular, 2nd as compact), and either use a media query and custom CSS to completely hide the first one/display the second one below 992px and vice versa. Something like:

    /* Above 992px width */
    @media screen and (min-width: 992px) {
      /* Force hide the second search */
      .wpdreams_asp_sc-2, .asp-try-2 {
        display: none !important;
      } 
    }
    /* Below 992px width */
    @media screen and (max-width: 991px) {
      /* Force hide the first search */
      .wpdreams_asp_sc-1, .asp-try-1 {
        display: none !important;
      } 
    }

    This is the fastest and the best possible method I can think of.

    Best,
    Ernest Marcinko

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


    #11560
    mverrastro
    mverrastro
    Participant

    Thanks for your answer Ernest.

    You can close the ticket.

    #11573
    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 4 posts - 1 through 4 (of 4 total)

The topic ‘Compact Mode In Responsive’ is closed to new replies.