Layout sederhana HTML dan CSS

           "Membuat Halaman  Dengan  CSS & Html"


1.buat halaman baru  dan  disimpan degan nama "layout.html"



  <!DOCTYPE html>

<html>

<head>
    <title>layout css</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table border="0" cellpadding="0" cellpadding="0" class="halaman">
<tr>
<td colspan="3" align="center">
    <div class="header"></div.
</td>

</tr>

<tr>
    <td colspan="3" align="center">
        <div class="menu"></div>
    </td>
</tr>
<tr>
    <td><div class="kiri"></div></td>
    <td><div class="tengah"></div></td>
    <td><div class="kanan"></div></td>
</tr>
<tr>
    <td colspan="3">
        <div class="footer"></div>
    </td>
</tr>
    
</table>
</body>
</html>


2selanjutnya buatalah halaman baru lagi dan simpan dengan nama "style.css"


.halaman {

    width: 920px;

    background: #11043e;
    margin-left: auto;
    margin-right: auto;
    border: 3px #dd11ee solid;
    margin-top: 50px;
    border-radius: 3px;
    box-shadow:0px  1px 3px #ac0000 ;
    overflow-y: auto;
}

.header {
    width: 100%;
    height: 120px;
    background: #bb0000;

}

.menu {
    width: 100%;
    height:30px;
    background: #9400d3;

}
.kanan    {
     width: 180px;
     min-height: 400px;
     background: #32cd32;

}

.tengah {
     width: 740px;
     height: 400px
     background: #48d1cc;
     opacity: 0.9;
     filter: alpha(opacity=40);

 }

 .kiri {
     width: 180px;
     height: 400px;
     background: #32cd32;

 }
 .footer {
     clear: left;
     width: 100%;
     height: 50px;
     background: #9400d3;
 }  


3. selesai dan lihat hasilnya di broswer yang kalian pakai


Comments