DEV Community

Cover image for 🤦‍♂️ Weekly fail (35/2020)
Ondrej Polesny for Kontent.ai

Posted on

2

🤦‍♂️ Weekly fail (35/2020)

While working on the styles of my site, I decided to hide a background video for mobile devices (bandwidth reasons). The video was placed in a wrapper to ensure it always occupies the whole available space.

The problem was that later I could not get the video element to be displayed at all. I spent half an hour debugging in multiple browsers and still could not get the element to show up. I was on the edge of calling someone for help when I noticed this:

CSS hiding the wrapper element with display:none

Lesson learned: Always pay attention to the most basic styles (often without any media query restriction) that are applied to parent elements and are hiding on the top of your stylesheet files.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay