Selamat Datang di Blog AGUNG PANJI SASMITO

Sabtu, 26 Februari 2011

Belajar Web Programming : Studi Kasus Modul 4 - Desain Web CSS

Selamat malam =)
Sekarang kita akan mencoba membuat tempate sebuah halaman web

CSSnya adalah sebagai berikut.

body {
margin: 10px auto;
width: 750px;
}

header,nav,section,footer {
display:block;
padding: 10px;
}

button input{
height:15px;
width:50px;
border: 1px solid black;
}

right{
float: right;
}

header{
height:40px;
border: 1px solid green;
}

nav{
height:40px;
border: 1px solid blue;
}

section{
clear: both;
height:400px;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
border: 1px solid red;
}

article{
float:left;
width:500px;
height:380px;
border: 1px dashed red;
}

aside{
float:right;
width:210px;
height:380px;
border: 1px dashed blue;
}
footer{
clear:both;
height:10px;
border: 1px solid green;
}



Sementara itu untuk file HTMLnya
<!DOCTYPE HTML>
<html lang="en">

<head>
<title>Desain Layout Sederhana HTML5</title>
<link rel="stylesheet" href="StudiKasus.css" type="text/css" />
</head>

<body>

<header>
header
</header>

<nav>
nav
<right>
<button>
Home
</button>
<button>
Menu
</button>
</right>
</nav>

<section>
<article>
article
</section>
<aside>
aside
</aside>
section
</section>

<footer>
footer
</footer>

</body>
</html>


Screenshoot


Untuk tampilan demo-nya bisa dilihat di sini.

Tidak ada komentar:

Posting Komentar

Jangan lupa memberi komentar pada setiap postingan saya!

TInggalkan Komentar