.wrapper {
width: 100%;
min-width: 20em; /* Will be AT LEAST 20em wide */
}
What does width: 100%; do and why is it necessary here ?
.wrapper {
width: 100%;
min-width: 20em; /* Will be AT LEAST 20em wide */
}
What does width: 100%; do and why is it necessary here ?
width: 100% means take up entire available space that is available to it
and min-width: tells you to take up at least ‘that amount’ of space no matter what or possible
another important thing to note here is that and im quoting form that article
min-widthproperty always overrides thewidthproperty whether followed before or afterwidthin your declaration
and another quote from that article
best way to use
min-widthis to define awidthvalue as a percentage and use an absolute value for themin-widthproperty otherwise using a percentage value for for bothmin-widthandwidthwill not produce the expected result