반응형
250x250
Notice
Recent Posts
Recent Comments
Link
관리 메뉴

Yeonee's Story

화면구조잡기 HTML 본문

VsCode(HTML)

화면구조잡기 HTML

yeonee 여니 2023. 5. 17. 12:59
728x90
반응형
SMALL

안녕하세요.

#yeoneeblog 여니입니다 :)

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            box-sizing: border-box;
            /*
                지금부터 지정하는 가로세로길이는 테두리까지 포함한 길이임을 의미
            */
            border: 1px solid blue;
        }

        /* 전체를 감싸는 div wrap */
        .wrap{
            width:1000px;
            height: 800px;
            margin:auto;/* 좌우로 가운데로 자동정렬 시켜줌*/
        }

        /* 크게 3가지 영역에 스타일 부여*/
        /* #header , #content , #footer*/
        .wrap>div{ /* class 속성이 wrap이면서 자손태그중 div태그에만 스타일 부여하겠다 */
            width: 100%;
        }

        #header, #footer{
            height: 20%;
        }

        #content{
            height: 60%;
        }

        #content>div{
            height: 100%;
            float:left;
            /* 블럭요소인 div들을 옆으로 배치되게끔 해줌 */
        }
        #content_1{
            width: 20%;
        }
        #content_2{
            width: 80%;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <div id="header"></div>
        <div id="content">
            <div id="content_1"></div>
            <div id="content_2"></div>
        </div>
        <div id="footer"></div>
    </div>
</body>
</html>
728x90
반응형
LIST