커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
로그인 버튼을 중앙으로 옮기기 - 2번째
undefined주차
북마크
이*욱
댓글
1
추천
0
조회수
8
조회수
8
답변 완료



아래 답변은 감사합니다. 하지만 제가 원했던 답변과는 다소 차이가 있네요.

실행되는 코드가 아닌 왜 이렇게 해야 하는지에 대한 설명이 필요합니다.

제 질문이 잘못 되었을까요? 아래 다시 질문 합니다.


.btnWrapper{
          display: flex;
          flex-direction: column;
          align-items: center;
        }
        .btn{
            width:100px;
            margin: auto;
            align-self: center;
        }


  1. .btnWrapper 를 궂이 사용해야 하는 이유.
  2. display: flex; --> display는 언제 왜 사용하는 것인지
  3. flex 옵션은 무었을 말하는 것인지
  4. align-items, align-self 의 차이,
  5. align- 옵션들과 alignment 와의 차이


답변 부탁드립니다.


아래는 이전 질문에서 주신 코드입니다.

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


감사합니다.










취소
 공유
취소
댓글 0
댓글 알림
나의얼굴