When writing a webpage in html, can you use two different quantitative measures for width and min_width?
For example can you use:
width: 90%
min-width: 600px
Do they both have to be the same unit of measurement (px or %) or does it not matter? I'm trying this in a webpage but it is not working. I am using this to minimally size a jqGrid table, but I wouldn't think that would matter.
These can definitely work together. The width declaration will be set 90% of whatever it's container width is. The min-width makes it so that element has to be at least 600px wide.
It should be min-width: 600px;
. They can be used together and can use different units. See an example here. The element will not shrink to any smaller than the min-width
, if there is enough space it will use the width
value, so in this case 90% of the available space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With