스파르타코딩클럽 로고
로그인
에듀윌 × 스파르타
오직 에듀윌러만! 50% 할인 쿠폰팩 받으러 가기
전체 강의
부트캠프
국비
커뮤니티
블로그
이벤트
고객센터
기업 서비스
둘러보기
인텔리픽
신입 개발자 채용 공고를 한 곳에서
로그아웃
자유게시판
학습 질문
개발일지
나의 활동
자유게시판
학습 질문
개발일지
나의 활동
즉문즉답
7시간 만에 튜터 답변 완료
margine-top이 작동하지 않는 이유? 어떤 부분이 잘못되었을까요?
웹개발 종합반
1주차
북마크
탁*현
댓글
1
추천
0
조회수
13
조회수
13
즉문즉답
7시간 만에 튜터 답변 완료
스파르타 즉문즉답

해설문 보면서 따라하다가 이슈가 생겨서 여쭤봅니다

스파르타 즉문즉답



위 : 이슈가 있는 코드

<head>

.postingbox > button {
    margin-top: 10px;




<body>

    <div class="postingbox">
        <div class="form-floating mb-3">
            <input type="name" class="form-control" id="floatingurl" placeholder="닉네임">
            <label for="floatingurl">닉네임</label>
        </div>

        <div class="form-floating">
            <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
            <label for="floatingTextarea2">응원댓글</label>
        </div>

        <div class="buttons">
            <button type="button" class="btn btn-dark ">기록하기</button>

        </div>
    </div>

</body>


아래 : 전체 코드

<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>

<title>스파르타코딩클럽 | 부트스트랩 연습하기</title>
<style>
    .mytitle {

        width: 100%;
        height: 250px;

        background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5)), url("https://movie-phinf.pstatic.net/20210715_95/1626338192428gTnJl_JPEG/movie_image.jpg");
        background-position: center;
        background-size: cover;

        color: white;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }


    .postingbox{
        max-width: 500px;
        width: 95%;


        margin: 20px auto 8px auto;

        box-shadow: 3px 3px 3px 3px gray;
        padding: 20px;

        background-position: center;
        background-size: cover;


    }

    .postingbox > button {
        margin-top: 10px;
    }
    </style>
</head>

<body>
<div class="mytitle">
        <h1> 재키와이 팬 방명록 </h1>
</div>

<div class="postingbox">
        <div class="form-floating mb-3">
            <input type="name" class="form-control" id="floatingurl" placeholder="닉네임">
            <label for="floatingurl">닉네임</label>
        </div>

        <div class="form-floating">
            <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
            <label for="floatingTextarea2">응원댓글</label>
        </div>

        <div class="buttons">
            <button type="button" class="btn btn-dark ">기록하기</button>

        </div>
    </div>

</body>


</html>


취소
 공유
취소
댓글 0
댓글 알림
나의얼굴
목록으로