• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 HTML/CSS 게시판 margin 문제

margin 문제

  • 이 주제에는 1개 답변, 2명 참여가 있으며 codingapple2 년 전에 전에 마지막으로 업데이트했습니다.
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #87691

    황은지
    참가자
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link href="../css/prac.css" rel="stylesheet">
    
    </head>
    <body>
    <div class="form-background">
    <div class="form-white">
    <form>
    <div class="w-100">
    <h1>contact us</h1>
    <p>Your Email</p>
    <input class="input-form" type="email" placeholder="email@example.com">
    </div>
    <div class="w-50">
    <p>First name</p>
    <input class="input-form" type="text">
    </div>
    <div class="w-50">
    <p>Last name</p>
    <input class="input-form" type="text">
    </div>
    <div style="clear: both;"></div>
    <div class="w-100">
    <p>Message</p>
    <textarea class="input-form input-long"></textarea>
    </div>
    <div>
    <input id="sc" type="checkbox">
    <label for="sc">Subscirbe</label>
    <button class="btn" type="submit">SEND</button>
    </div>
    </form>
    </div>
    </div>
    </body>
    </html>
    
    
    
    
    
    div, input, textarea {
      box-sizing: border-box;
    }
    h1, p, label, button {
      font-family: cursive
    }
    a {
      text-decoration: none;
      color: black;
    }
    .input-form {
      padding: 15px;
      font-size: 20px;
      border: 1px solid gray;
      border-radius: 10px;
      
       width: 100%;
    }
    .form-background {
      background-color: lightgray;
      padding: 30px;
    }
    .form-white {
      background-color: antiquewhite;
      padding: 30px;
      
      width: 80%;
      max-width: 700px;
      
      margin: auto; 
    }
    .w-50 {
      float: left;
      width: 50%;
      padding: 10px;
      
      overflow: hidden;
    }
    .btn {
      background-color: powderblue;
      width: 120px;
      padding: 15px;
      border: none;
      border-radius: 5px;
    }
    .w-100 {
      width: 100%;
      padding: 10px;
    }
    .input-long {
      height: 150px;
    }
    
    
    
    버튼을 오른쪽으로 정렬 시키려고 하는데 margin-right가 먹질 않습니다. 왜 그런지와 해결방법은 없을까요?
    #87705

    codingapple
    키 마스터
    display : block 줘야 margin-어쩌구 : auto 잘먹습니다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠