Inline menu modification- width issue

Topic summary

A user modified the Dawn theme to create an inline navigation menu but encountered persistent width issues—gaps appeared on both sides with a horizontal scrollbar, requiring constant manual percentage adjustments in base.css.

Initial Problem:

  • Menu width unstable despite setting width: 109% in CSS
  • Gaps and scrollbar appearing inconsistently

Solution Process:

  • First fix addressed desktop display by setting header padding/margin to 0 and menu width to 100%
  • Issue persisted on tablets and other display sizes, showing gaps remained
  • Multiple code iterations were needed, with the user initially placing code in the wrong location

Final Resolution:
Adding CSS targeting the header element with max-width: 100%, padding: 0, and margin: 0 in the correct location within base.css resolved the responsiveness issues across all screen sizes.

Status: Resolved. The menu now displays properly without gaps or scrollbars on different devices.

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

Hello I had modified dawn theme with an inline nav menu ( code taken from another user here) but the menu width keeps changing on me and there’s a gap on both sides and scroll bar on the bottom to move it side to side, I keep manually tweaking the percentage in the code but somehow after making changes it moves and i have to change the % value again. can someone help me with this? base.css code I play around with is this…

nav.header__inline-menu { background: #a1aec4 !important; width: 109% !important; text-align-last: center; }

test123

Hi Lavished

  • You can try to follow this step
    Step 1: Go to Edit code
    Step 2: Find file base.css and add this code at the end of the file
header.header.header--top-center.header--mobile-center.page-width.header--has-menu.header--has-account {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

nav.header__inline-menu {
    width: 100% !important;
}

Result:

Best,
Esther

thank you it worked on desktop but it is not adaptive/responsive to other display sizes see pictures. on different tablets it the gap comes back.

Hi Lavished

Please add this code as well in base.css file

header.header.header--top-center.header--mobile-center.page-width.header--has-menu.header--has-account {
    padding: 0 !important;
}

Result:

unfortunately it didn’t work. I noticed that code was also used above. see pic of codes.

Hi
I tried again and it worked correctly with this code.

header.header.header--top-center.header--mobile-center.page-width.header--has-menu.header--has-account {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

I entered the codes see picture, and it doesn’t show when I inspect header see pic below. problem persist.

thanks for helping, is it better to remove inline header menu and reinstall correctly?

You can try to add this code in here: https://prnt.sc/ogPBse4C3kWo

header.header.header--top-center.header--mobile-center.page-width.header--has-menu.header--has-account {
    margin: 0;
    max-width: 100%;
    padding: 0;
}
1 Like

IT Worked! thank you so much for persevering! :tada: