
아래 답변은 감사합니다. 하지만 제가 원했던 답변과는 다소 차이가 있네요.
실행되는 코드가 아닌 왜 이렇게 해야 하는지에 대한 설명이 필요합니다.
제 질문이 잘못 되었을까요? 아래 다시 질문 합니다.
.btnWrapper{
display: flex;
flex-direction: column;
align-items: center;
}
.btn{
width:100px;
margin: auto;
align-self: center;
}
답변 부탁드립니다.
아래는 이전 질문에서 주신 코드입니다.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>로그인 페이지</title>
<style>
.mytitle{
width: 300px;
height: 200px;
color: white;
text-align: center;
background-image: url("https://www.ancient-origins.net/sites/default/files/field/image/Agesilaus-II-cover.jpg");
background-size: cover;
background-position: center;
border-radius: 10px;
padding-top: 40px;
}
.wrap{
background-color: green;
width: 300px;
margin: auto;
align-items: center;
}
.btnWrapper{
display: flex;
flex-direction: column;
align-items: center;
}
.btn{
width:100px;
margin: auto;
align-self: center;
}
</style>
</head>
<body>
<div class="wrap">
<div class="mytitle">
<h1>로그인 페이지</h1>
<h5>아이디, 비밀번호를 입력해 주세요</h5>
</div>
<h1>로그인 페이지</h1>
<p>ID: <input type="text" /></p>
<p>PW: <input type="text" /></p>
<div class="btnWrapper">
<button class="btn">로그인 하기</button>
</div>
</div>
</body>
</html>
감사합니다.

