You can create a 100% scalable website. As Roar said, you can do this using percentages, but it's tricky.
The best option is to use @media queries . This allows CSS rules to be applied to the page only under certain conditions. Using media queries to determine the width of the device and / or page width, you can apply subtle control over how your site looks at different sizes of viewports. For example:
@media screen and (max-device-width: 960px) { font-size:14px; } @media screen and (max-device-width: 480px) { font-size:13px; }
Now the above example is pretty trivial and far-fetched. For a deeper understanding of what you can accomplish with media queries, I recommend that you look at the W3C specification . Some of the most powerful are the requests width , min-device-width , max-device-width , portrait|landscape and print .
As a side note, be sure to include these styles at the bottom of your CSS so that they are not overwritten by default.
Moses Aug 03 2018-11-11T00: 00Z
source share