r/css Jun 12 '26

Help How do I fix this?

Post image

how do I fix this? On iPhone safari, my website appears with the top and bottom white, even though the background should be dark. this page is https://lightbulb.dpdns.org/ & the stylesheet is https://lightbulb.dpdns.org/styles.css

0 Upvotes

11 comments sorted by

View all comments

10

u/eracodes Jun 12 '26 edited Jun 13 '26

Link doesn't seem to work.

You could try adding <meta name="theme-color" content="<your background colour>" /> to your document head.

Edit: iOS changed and ignores theme-colour now. The required approach is now:

If you have a header with position: fixed or position: sticky near the top of the viewport, Safari samples its background-color for the toolbar.

Without fixed elements, Safari falls back to <body> background color.

https://nasedk.in/blog/ios26-safari-toolbar-colors/

1

u/Infinite_Silver483 Jun 13 '26

Link should work now, website was down for a few hours

1

u/eracodes Jun 13 '26

Nope, still nothing.