
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style>
#test{
width : inherit;
height : 300px;
background-color : mediumaquamarine;
}
#test1{
width : 30%;
height : inherit;
background-color : red;
}
#test2{
width : inherit;
height : inherit;
background-color : blue;
}
</style>
<body>
<div id="test">
<div id="test1">
<div id="test2">
</div>
</div>
</div>
</body>
개인적으로 css 공부를 하다 문의사항이 있어서 여쭤볼려 합니다.
다음 예문에서 test는 body의 width를 받아 100%
test1은 전체의 30% 인것을 알겠는데
test2가 test1의 전체 width의 30%를 받아왔는데 ㅈ자리가없어서 남은자리만큼 표시한건지
아님 test 1의 30%인 전체의 width의(0.3*0.3) 9%를 받아오는지 궁금합니다.
실행창은

파란색 test2
빨간색 test1
초록색 : test입니다.
