実現したいこと
・ヘッダーに画像が重ならないようにしたいです。
該当のソースコード
html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>モンハンの人気タイトル紹介</title> <link rel="stylesheet" href="../css/GameStyle.css"> <script src="../js/jquery-2.1.4.min.js"></script> <script src="../js/Mainscript.js"></script> <script src="../js/GameScript.js"></script> </head> <body> <header> <h1>MonsterHunter</h1> <button class="Menu"><img src="../img/button.png" alt="Menu"></button> </header> <nav> <ul> <li><a href="../html/index.html">ホーム</a></li> <li><a href="../html/game_introduction.html">人気タイトルランキング</a></li> <li><a href="../html/contact.html">お問い合わせ</a></li> </ul> </nav> <h1 class="title">シリーズ人気タイトルランキング</h1> <div class="content"> <div id="wrapper"> <div id="slide"> <ul> <li><img src="../img/MH/MHW.jpg" width="650" height="650" alt="img1"></li> <li><img src="../img/MH/MHp2g.jpg" width="650" height="650" alt="img2"></li> <li><img src="../img/MH/MHp3.jpg" width="650" height="650" alt="img3"></li> <li><img src="../img/MH/MH4g.jpg" width="650" height="650" alt="img4"></li> <li><img src="../img/MH/MHIB.jpg" width="650" height="650" alt="img5"></li> <li><img src="../img/MH/MH3g.jpg" width="650" height="650" alt="img6"></li> <li><img src="../img/MH/MH4.jpg" width="650" height="650" alt="img7"></li> <li><img src="../img/MH/MHX.jpg" width="650" height="650" alt="img8"></li> <li><img src="../img/MH/MHR.jpg" width="650" height="650" alt="img9"></li> <li><img src="../img/MH/MHG.jpg" width="650" height="650" alt="img10"></li> </ul> <button id="prevBtn"><img src="../img/prev.png" width="29" height="50" alt="Prev"></button> <button id="nextBtn"><img src="../img/next.png" width="29" height="50" alt="Next"></button> </div> </div> </div> </body> </html> css @charset "UTF-8"; body { margin: 0; padding-top: 150px; -webkit-font-smoothing:antialiased; } img { width: 100%; } .title { text-align: center; } ul { margin-top: 0; list-style: none; padding: 0px; } .content { margin-left: auto; margin-right: auto; } #wrapper { width:650px; margin:auto; } header { position: fixed; top: 0; padding: 5px; width: 100%; color: #40555F; background: #58C8D0; } header h1 { margin-left: 70px; font-weight: bold; } #slide { position: relative; overflow: hidden; height: 650px; } #slide ul { position: absolute; width: 6500px; } #slide li{ float:left; width: 650px; list-style-type:none; } button { position: absolute; top: 30px; background-color: transparent; border: none; cursor: pointer; width: 35px; height: 35px; } button img { width: 100%; } button:focus { outline: none; } button:hover { opacity: 1; } #prevBtn { position: absolute; top: 325px; left: 20px; } #nextBtn { position: absolute; top: 325px; right: 20px; } p { margin: 50px 0; line-height: 2em; } nav { position: fixed; top: 0; bottom: 0; width: 250px; margin-left: -250px; background: #5C7079; } .Menu { left: 20px; background-color: transparent; } nav li a { top: 0; text-decoration: none; display: block; padding: 36px 80px; color: #FFF; border-bottom: 1px solid #40555F; } nav li a:hover { background: #56676F; }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2023/07/16 14:00