max-width is the king of width?

Just get to know the max-width will override the width with !important. So is any other CSS settings have such high override property? It's a trap for a junior developer.
2 Replies
b1mind
b1mind3y ago
Its that min/max-width will be the "max" or "min" width so both can override*. Fun fact is if there is no content you have to have a width/height to make the box but then can set min/max on it. Typically using important and set widths and heights are what trap people. https://codepen.io/b1mind/pen/JjveXPd Also min would be the "king" 🤔
William_O^2
William_O^23y ago
min override the max, min is king and max is queen😆
Want results from more Discord servers?
Add your server