Category: Websites and UX

Mobile Menu Has a White Background on a Dark Website

Read this guide in Polish

The whole page is dark, but the header or drop-down menu on the phone still has a white beam.

Where's the problem coming from?

The mobile variant may have a separate class, default element background or CSS rule of higher specificity.

What to do step by step?

1. Open the inspector on mobile width and check the computed background-color element and parent.

2 . Find a rule that wins in the CSS cascade, also in media questions.

3 . Make sure the background menu and drop-down panel uses the same system design tokens.

4 . Check the contrast of logos, icons, links and states of focus and hover.

5 . Test the closed, developed, scrolled menu and the bright system screen.

Correction test and important trap

The header is consistent with the identification of the page and the navigational elements remain legible and accessible.

Do not add many more rules !important if the problem comes from one old style.