Steve
Steve

Reputation: 4908

How to make scalable web pages

I notice that pages like netflix.com and youtube.com display just as well on a 1024px iPad as they do on a 1900px monitor. In both cases all of the content is shown. Nothing is ever cut off.

This implies that the HTML, or JavaScript, senses the screen width and then scales everything to that size. If the native size is 1400px, for example, and the page is loaded into a 1024px screen, everything has to get scaled by 73%, including the fonts.

How do they do that?

Upvotes: 0

Views: 273

Answers (1)

Jaime Gomez
Jaime Gomez

Reputation: 7067

This is called Responsive web design, and the most common way to do it is by using CSS media queries.

So the page is not "scaled" per se, but designed to take advantage of the extra space and be usable despise the limitations of the consuming device.

Upvotes: 1

Related Questions