- Should I use max-width?
- Should tables be full width?
- What should I set my max-width to?
- Why do we use max-width?
Should I use max-width?
This is a simple way to put it: if the element would render wider than the max-width says it should be, then the max-width property wins over the width property. But if it would render less than the max-width says, then the width property wins. In mathematical terms: if width > max-width; let the browser use max-width.
Should tables be full width?
To support readability, I would recommend making tables as wide as they need to be and no bigger. The second table in your example is easier to read. Save this answer.
What should I set my max-width to?
It's best to make your website at least 1920px wide.
A 1280px website will look great on laptops and mobile devices but not so great on large monitors. To ensure your site looks just as good on big screens as it does on small screens, set your max site width to 1920px or more.
Why do we use max-width?
The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by max-width .