MrSunshine MrSunshine - 1 month ago 5x
CSS Question

CSS: How does youtube change its appearance based on screen size?

I'm interested in how youtube changes it's appearance based on the screen size without using javascript.

Try it yourself:
go to youtube and take a look at the navbar if the window size is smaller than 700px the logo changes.

This works even with javascript disabled.

I inspected the resources of the html css files of the page but couldn't find out how youtube does it.

If anyone knows the trick or has a guess - please answer.


they use the Responsive Web Design (Media Queries) :