How to make dropdown menu smaller in dawn theme?

Topic summary

Issue: The dropdown mega-menu in the Shopify Dawn theme appears too large with excessive black padding; the goal is to make it smaller like an older site version.

Solution provided: A CSS media query for desktop (min-width: 768px) sets .mega-menu to position: relative and .mega-menu[open] .mega-menu__content to width: 200px. The size reduces as desired.

Follow-up fix: The dropdown was misaligned (not directly below its header nav item). Adding !important to position: relative on .mega-menu corrected the alignment. The original poster confirmed the fix.

Technical notes: Dawn/Studio are Shopify themes. “mega-menu” is the dropdown’s CSS class; “@media (min-width:768px)” targets desktop; “!important” forces CSS priority.

New questions: Another user on the Studio theme reports the box size is correct but dropdown item text becomes vertical, asking where to insert the code and whether it applies to Studio. A different user notes a new issue after fixing their dropdown (details not provided).

Status: Dawn theme issue resolved for the original poster. Thread remains open with unresolved Studio theme implementation and an unspecified new issue.

Artifacts: Screenshots and CSS snippets are central to understanding the changes.

Summarized with AI on January 11. AI used: gpt-5.

Hello there fellow friends! Hope you having a great day. As for myself, my day is not that great due to this bug that has been eating my for a few days. So basically, the DROP DOWN menu on my website is too big. There is a lot of black padding which I would like to remove:

This is how it looks now

This is how I want it to look.(this is an older version of the website)

https://strapped-airsoft.myshopify.com/?_ab=0&_fd=0&_sc=1 Here’s the link. I would be very happy if someone could help me out a bit:)

Hi there,

The below CSS code should achieve what you are looking for:

@media (min-width:768px) {
.mega-menu {
position:relative;
}
.mega-menu[open] .mega-menu__content {
  width: 200px;
}
}

Let me know if everything works as expected.

Cheers!

Gabriel

Thank you very very much for your quick help. It worked perfectly but now another problem arises unfortunately… You see, the drop down menu is not below the header navigation text it belongs to

:

I would like for it to be underneath the navigation text it belongs to:) I would really be very grateful if you can help me here too!

Here you go:

@media (min-width:768px) {
.mega-menu {
position:relative !important;
}
.mega-menu[open] .mega-menu__content {
  width: 200px;
}
}

Kind regards,

Gabriel

2 Likes

Love you man. Lemme give u a kiss :face_blowing_a_kiss:

Glad to hear that! If this fixed your issue, please mark it as the solution.

Have a nice day!

I have this same problem but in Studio theme. I tried this code and the box was correct but the menu items text in the dropdown menu turned vertical. Where should I insert this code? And does it work for Studio theme?

My dropdown menu Got fixed but a new issue arises, unfortunately.