How can I fix alignment issues with my mobile search bar?

Topic summary

A user is experiencing mobile search bar alignment issues on their Shopify store (tudoconexao.com). The search bar extends beyond the screen on some devices, and the close button text appears partially hidden or cut off.

Solutions Provided:

  • thirtycoders suggested adding CSS code to base.css targeting screens under 550px width, adjusting visibility and margins
  • PageFly-Oliver recommended inserting code into theme.liquid file

Current Status:

The initial alignment problem has been resolved using one of the suggested solutions. However, a secondary issue persists: the close button should display “fechar” (Portuguese for “close”) but the full word doesn’t appear correctly. The user confirmed this remaining bug with a screenshot showing the truncated text.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hello,

I have an issue with my website.

https://tudoconexao.com

I’m having alignment problems with my search bar on mobile. On some cell phones it sticks out of the screen, and the “close” option is a little hidden. How do I fix this?

Hi @Dawenn ,

Simply follow these steps:

Navigate to Online Store → Theme → Edit code.
Search for the file “base.css.”
Paste the provided code at the bottom of the file.
Save your changes.

@media screen and (max-width: 550px)
.header__search-bar-wrapper.is-visible {
    visibility: visible;
    margin-bottom: -59px;
    margin-left: -15px;
}
.search-bar__input {
    height: 100%;
    width: 100%;
    padding: 0 0px 1px 12px !important;
    border: solid 1px var(--bordamenu);
    line-height: normal;
    color: var(--heading-color);
    -webkit-appearance: none;
    border-radius: 10px 0 0 10px;
    border-right: 0;
}
}

Thank you

1 Like

Hi @Dawenn ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

1 Like

The first problem has been resolved, thank you! But the “close” option is still a bit buggy

It’s supposed to say “fechar”, but the whole word doesn’t appear