해결된 질문
작성
·
157
1
태그는 아래와 같이 입력했어요. 이렇게 입력하면 parent값은 height값이 없으니까 자동적으로 child값의 height값으로 해야 되는데 왜 자식요소와 부모요소 사이에 왜 공백이 생기죠?
강의에 나온데로 적었거든요. 그런데 노랑박스랑 빨간색 박스랑 공백이 생겨요 강의에는 그렇게 안되고 노란색 박스가 가득차는데도요
-----------------------html-----------------------
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/style4.css">
<body>
<div class="parent">
<div class="child"></div>'
</div>
</body>
</head>
</html>
--------------------------css-------------------------
답변 1
1
스타일 코드가 없어서 정확히는 모르겠지만 html 코드를 보니까 좀 이상한데요.
<div class="parent">
<div class="child"></div>' ← ' 이건 뭔가요? 이거 지워보세요.
</div>