How to make the search box full width on mobile

Ivory Search Forums Support How to make the search box full width on mobile

Viewing 5 reply threads

You must be logged in to create new topic or reply to the topic.

  • Author
    Posts
    • #22152
      paulx
      Participant
      • Topics: 1
      • Replies: 4

      Hello, I have been trying to add some custom css to make the search box full width on mobile but no luck, can you help to take a look? The site is realfofa.org, also pls see attached screen shot.

      Attachments:
      You must be logged in to view attached files.
    • #22156
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      I hope you are well today and thank you for your question.

      You can achieve this by adding the below CSS code in the Custom CSS option of Ivory Search plugin settings on the path Admin Area -> Ivory Search -> Settings -> Settings

      @media (max-width: 921.9px) {
      #ast-mobile-header form.is-search-form {
          width: 490px;
          max-width: 100%;
      }
          
      #ast-mobile-header .site-header-section{
          justify-content: left;
      }
      }

      Best regards,
      Ivory Search Support

      • #22160
        paulx
        Participant
        • Topics: 1
        • Replies: 4

        Thank you for your quick response! I tried that but is there anyway to make the search box fit the width of the screen automatically? currently on my phone the search box is too long that it goes beyond the screen (see attached screenshot).

        Attachments:
        You must be logged in to view attached files.
    • #22166
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      Your website is not accessible now.

      Please make sure that it is accessible so I can help you.

      • #22169
        paulx
        Participant
        • Topics: 1
        • Replies: 4

        Sorry was making some updates to DNS, should be good now: realfofa.org

    • #22177
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      Please try using the CSS code below to replace the above shared CSS code.

      @media (max-width: 921.9px) {
          #ast-mobile-header form.is-search-form {
              width: 100%;
              margin-top: 11px;
          }
              
          #ast-mobile-header .site-header-section{
              justify-content: left;
              display: block;
              width: 100% !important;
          }
      
          #ast-mobile-header .ast-builder-layout-element{
              display: block;
          }
      }
      
      • #22181
        paulx
        Participant
        • Topics: 1
        • Replies: 4

        Thank you! the search box itself works perfectly! But it now pushes the Toggle button aside to a weird position, please see the screenshot here: https://imgur.com/a/o9fKMJv. Can you help to take a look? Thank you!

    • #22193
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      Please change the above CSS code to the one below or replace it.

      @media (max-width: 921.9px) {
          #ast-mobile-header form.is-search-form {
              width: 92%;
              margin-top: 11px;
          }
              
          #ast-mobile-header .ast-below-header-wrap  .site-header-section{
              justify-content: left;
              display: block;
              width: 100% !important;
          }
      
          #ast-mobile-header  .ast-builder-layout-element{
              display: block;
          }
      }
      • #22195
        paulx
        Participant
        • Topics: 1
        • Replies: 4

        It worked! Thanks a lot for the help!

    • #22196
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      You are always welcome, I’m glad I was able to help you with this matter. There is no obligation but by your kind words I wonder if I could trouble you to leave a review based on this experience here:

      Click to leave a review

      I’d appreciate that. 🙂

      If I can help you further, please don’t hesitate to ask.

Viewing 5 reply threads

You must be logged in to create new topic or reply to the topic.