確認テスト2
コンテナーとヘッダーの上部分に空きがない。
ナビゲーション部分 疑似クラスで設定してるが色、幅ともに変わらず。
↓下記は見本↓
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>css03</title> /*外部css記述*/ <link rel="stylesheet" type="text/css" href="kadai.css" media="all"> <style type="text/css"> <!- @charset=UTF-8; *{ margin: 0; padding: 0; font-size: 100%; font-height: normal; font-style: normal; text-align: left; border: none; list-style-type: none; } li { display: inline; } #container { width: 840px; height: 760px; background-color: #000; } #header{ width: 800px; height: 120px; margin: 10px; padding: 10px; text-align: center; background-color: #f88; } #nav{ width: 800px; height: auto; margin: 10px; } #nav ul{ width: 800px; height: 60px; border-top: 2px outset #111; border-right: 2px outset #111; border-left: 8px outset #111; border-bottom: 2px outset #111; overflow: auto; } #nav li{ width: 800px; height: auto; padding: 50px; float: left; background-color: #fff; } #nav li a{ padding: 10px; } #nav a:link, #nav a:visited{ color: #a1a; background-color: #fff; } #nav a:hover{ color: #a1a; background-color: #; } #wrapper{ width: 800px; height: 440px; margin: 10px; padding: 10px; background-color: #332; } #content{ width: 600px; height: 440px; float: right; background-color: #009; overflow: auto; display: inline; } #sidebar{ width: 200px; height: 440px; float: left; background-color: #0f0; overflow: auto; display: inline; } #footer{ width: 800px; height: 60px; margin: 10px; padding: 10px; background-color: #f0f; } p{ color: #fff; } --> </style> </head> <body> <div id="container"> <div id="header"> <h1>MUSIC IS LIFE</h1> </div> <div class="nav"> <ul> <li><a href="#">HOME</a></li> <li><a href="#">RADIO</a></li> <li><a href="#">MIXTAPE</a></li> <li><a href="#">NEWS</a></li> <li><a href="#">CONTACT</a></li> </ul> </div> <div id="wrapper"> <div id="content"> <p>本文%内容</p> </div> <div id="sidebar"> <p>サイドバー</p> </div> </div> <div id="footer"> <address>連絡先</address> </div> </div> </body> </html>