
안녕하세요,
제가 방금 1주차의 숙제를 대략적으로 완성을 하였는데, 코드가 어디가 잘못된 건지
1) 가운데 부트스트랩의 가로길이가 안맞는 부분
2) 응원남기기 버튼이 box-shadow 안에 들어가지 않는 부분
이 해결이 안되어 질문드려봅니다.
감사합니다.
코드 공유드립니다.
<!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> <link href="https://fonts.googleapis.com/css2?family=Nanum+Gothic&family=Nanum+Myeongjo&family=Noto+Sans+KR&family=Noto+Serif+KR:wght@200&display=swap" rel="stylesheet"> <style> * { font-family: 'Noto Serif KR', serif; } .mytitle { background-color: green; width: 100%; height: 250px; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://cdn.mos.cms.futurecdn.net/X2HayNRX94wPEBtGqg7MJE-1024-80.jpg.webp"); background-position: center; background-size: cover; text-align: center; display:flex; flex-direction: column; justify-content: center; align-items: center; color: white; } .card { margin-top: 10px; } .mybox { width: 500px; height: 200px; box-shadow: 0px 0px 3px 0px gray; padding: 20px; margin: 20px auto 0px auto; } .mybox > button { margin-top: 10px; } .wrap { width: 500px; height: 200px; margin-top: 30px; padding: 20px; margin: 20px auto 0px auto; } </style> </head> <body> <div class="mytitle"> <h1>타이타닉(The Titanic) 팬명록</h1> </div> <div class="mybox"> <div class="form-floating mb-3"> <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> <label for="floatingInput">닉네임</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> <button type="button" class="btn btn-dark">응원 남기기</button> </div> <div class="wrap"> <div class="card"> <div class="card-body"> <blockquote class="blockquote mb-0"> <p>새로운 앨범 너무 멋져요!</p> <footer class="blockquote-footer">호빵맨 <cite title="Source Title"></cite></footer> </blockquote> </div> </div> <div class="card"> <div class="card-body"> <blockquote class="blockquote mb-0"> <p>새로운 앨범 너무 멋져요!</p> <footer class="blockquote-footer">호빵맨 <cite title="Source Title"></cite></footer> </blockquote> </div> </div> <div class="card"> <div class="card-body"> <blockquote class="blockquote mb-0"> <p>새로운 앨범 너무 멋져요!</p> <footer class="blockquote-footer">호빵맨 <cite title="Source Title"></cite></footer> </blockquote> </div> </div> </div> </body> </html>
