inline 요소들 , table rows , row groups (thead,tfoot,tbody) 은 width, height를 가질 수 없는 반면에 (글자의 길이와 높이에 따라서 자동으로 지정됨),
block과 inline-block 요소들은 width, height를 가질 수 있다.
<aside> 💡 width , height는 자동 상속되는 속성이 아닙니다.
</aside>
속성 값으로는
부모 요소에
상대적인 너비 (부모요소가 500px일 때 50%라면 250px) <div class="container">
<div class="content"></div>
</div>
.container {
width: 400px;
height: 100px;
background-color: blue;
}
.content {
height: 100px;
background-color: gray;
}