Width & Height
HC · Box Modelsyntax
width: value; height: value;
min-width | max-width | min-height | max-heightexample
.container {
width: 100%;
max-width: 1200px;
}
.sidebar {
width: 280px;
min-height: 100vh;
}
.avatar {
width: 48px;
height: 48px;
aspect-ratio: 1;
}Note Avoid setting fixed heights on text containers since content length varies. Use min-height instead. The aspect-ratio property maintains proportions without needing both width and height.