css単列レイアウト

825 ワード

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        body{margin: 0;padding: 0}
        .main{
            background-color: #464646;
            width: 800px;
            height: 300px;
            margin: 0 auto;
        }
        .top{
            height: 100px;
            background-color: #3080CB;
        }
        .footer{
            width: 800px;
            height: 200px;
            margin: 0 auto;
            background-color: #006486;
        }
    </style>
</head>
<body>
    <div class='top'></div>
    <div class="main"></div>
    <div class="footer"></div>
</body>
</html>