-
카테고리
-
세부 분야
웹 개발
-
해결 여부
해결됨
정답을 알려주세요
22.12.10 21:02 작성 22.12.10 21:04 수정 조회수 246
0
.wapper__left에 208px을 주고 left__body랑 left__header에 100%를 줬는데 왜 body_header은 왜 자꾸 206px이 될까요?
그래서 자꾸 margin을 주면 회색 상자랑 line이랑 2px씩 차이가 나서 안맞아요
답변을 작성해보세요.
0
ssy
지식공유자2022.12.12
안녕하세요 민석님!
HTML과 CSS 코드를 보여주셔야 원인을 찾을 수 있을 것 같습니다😅index.html
과 index.css
의 코드를 보여주실 수 있을까요?
민석
질문자2022.12.21
<!DOCTYPE html>
<html lang="ko">
<head>
<title>송민석님의 미니홈피 :: 사이좋은 사람들, 싸이월드</title>
<link rel="stylesheet" href="index.css">
<script src="https://kit.fontawesome.com/485930f8f3.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="background">
<div class="outerbox">
<div class="wrapper">
<div class="wrapper__left">
<div class="wrapper__left__header">
<div class="today">
<span>TODAY</span>
<span>0</span>
<span> | TOTAL</span>
<span>220820</span>
</div>
</div>
<div class="wrapper__left__body">
<div class="left__body__header">
<div class="left__body__header__gray"></div>
<div class="left__body__header__line"></div>
</div>
<div class="left__body__profile">
<div class="profile__detail"><i class="fa-regular fa-user"></i>
이름
</div>
<div class="profile__detail"><i class="fa-solid fa-phone"></i>
phone
</div>
<div class="profile__detail"><i class="fa-solid fa-envelope"></i>
E-mail
</div>
<div class="profile__detail"><i class="fa-brands fa-instagram"></i>
인스타그램
</div>
</div>
<div class="left__body__footer">
<div class="footer__feel">오늘의 기분</div>
<div class="feel__detail"></div>
</div>
</div>
</div>
<div class="wrapper__right"></div>
</div>
</div>
</div>
</body>
</html>
민석
질문자2022.12.21
*{
box-sizing: border-box;
margin: 0px;
}
.background {
width: 1024px;
height: 600px;
background-image: url("../images/background.png");
padding: 20px 0 0 20px;
}
.outerbox{
width: 808px;
height: 544px;
background-image: url("../images/outerbox.png");
}
.wrapper{
display: flex;
flex-direction: row;
padding: 32px 0px 0px 32px;
}
.wrapper__left{
width: 208px;
height: 472px;
display: flex;
flex-direction: column;
}
.wrapper__left__header{
width: 100%;
height: 30px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.today{
font-size: 9px;
}
.wrapper__left__body{
width: 100%;
height: 100%;
border: 1px solid gray;
border-radius: 15px;
background-color: white;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px 30px 0px 30px;
}
.left__body__header{
width: 100%;
display: flex;
flex-direction: column;
}
.left__body__header__gray{
width: 148px;
height: 133px;
background-color: gray;
}
.left__body__header__line{
border-top: 1px dotted black;
margin: 12px 0px;
}
.left__body__profile{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.profile__detail{
font-size: 9px;
color: #999999;
margin-bottom: 10px;
display: flex;
flex-direction: row;
}
.left__body__footer{
width: 100%;
margin-bottom: 57px;
display: flex;
}
.footer__feel{
font-size: 11px;
line-height: 15px;
color: #999999;
}
.wrapper__right{
width: 524px;
height: 472px;
background-color: blueviolet;
}
답변 1