강의

멘토링

커뮤니티

Inflearn Community Q&A

rty15321474's profile image
rty15321474

asked

[2025 Exam Criteria] Web Design Technician Practical Exam Complete Guide

13. Arranging HTML Horizontally with CSS (float, overflow, clear, inline-block)

질문 있습니다.

Resolved

Written on

·

166

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-------------------------

jqueryHTML/CSS웹 디자인

Answer 1

1

codingworks님의 프로필 이미지
codingworks
Instructor

스타일 코드가 없어서 정확히는 모르겠지만 html 코드를 보니까 좀 이상한데요.

<div class="parent">
    <div class="child"></div>'    ←  ' 이건 뭔가요? 이거 지워보세요.
</div>

rty15321474's profile image
rty15321474

asked

Ask a question