Jumat, 12 Mei 2017

Contoh Sederhana Mendesain Web Menggunakan CSS



<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#wrap {
                max-width:1000px;
                margin:auto;
                background-color:ligthyellow;
}

#slogan {
                position:absolute;
                width:400px;
                height:170px;
                top:10px;
                left:10px;
                /*background-color:yellow;*/
}
#slogan h1 {
                font-family:gabrielle;
                font-size:55px;
                text-align:right;
                font-weight:bold;
                color:green;
                margin-top:30px;
                margin-bottom:0px;
                padding:0;
                text-shadow:3px 2px 1px grey;
}
#slogan .slogan{
                font-family:tahoma,verdana,arial;
                font-size:14px;
                text-align:right;
                text-decoration:overline;
                color:brown;
                font-weight:bold;
                font-style:italic;
}

#kiri {
                width:200px;
                margin-top:30px;
                min-height:510px;
                position:relative;
                display:block;
                float:left;
}
#menu_vertikal {
                position:absolute;
                width:200px;
                height:300px;
                display:block;
                border:1px solid black;
                background-color:gray;
                color:white;
                line-height:30px;
                text-align:center;
}
#menu_vertikal li{
                list-style-type:none;
                text-align:left;
}
#menu_vertikal li a{
                text-decoration:none;
                width:175px;
                background-color:lightyellow;
                display:block;
                border-top:1px solid black;
                padding:.2em .8em;
}
#menu_vertikal ul{
                padding:0px;
                margin-top:8px;
}
#menu_vertikal li a:hover{
                background-color:lightgray;
                color:black;
}
#banner {
                position:absolute;
                top:305px;
                width:200px;
                height:200px;
                background-color:lime;
                display:block;
                border:1px solid black;
                margin-bottom:200px;
}
#content {
                position:absolute;
                float:left;
                max-width:793px;
                height:505px;
                margin-top:30px;
                margin-left:205px;
                background-color:lightyellow;
                display:block;
                border:1px solid black;
}
@font-face{
                font-family:gabrielles;
                src:url(gabrielle.ttf);
}
</style>
</head>
<body>
<div id="wrap">
                <div id="kiri">
                                <div id="menu_vertikal">
                                .:: Menu ::.
                                <ul>
                                                <li><a href="#"><span>Welcome</span></a></li>
                                                <li><a href="alam.html">Wisata Alam</a></li>
                                                <li><a href="kuliner.html">Wisata Kuliner</a></li>
                                                <li><a href="budaya.html">Wisata Budaya</a></li>
                                                <li><a href="foto.html">Photos</a></li>
                                                <li><a href="about.html">About Us</a></li>
                                                <li><a href="contact.html">Contact Us</a></li>
                                </ul>
                                </div>
                                <div id="banner">
                                                <img src="pict/banner.jpg" width="200px" height="200px"/>
                                </div>
                </div>
                <div id="content">
                                <b><p style="text-align:center"> Foto-foto Tempat Wisata </p></b>
                                <table>
                                <tr>
                                <th><img src="pict/prambanan.jpg" width="180px" height="180px" border="1px" align="center" hspace="10"/><br>Candi Prambanan<br>Sleman</th>
                                <th><img src="pict/paris.jpg" width="180px" height="180px" border="1px" align="center" hspace="10"/><br>Pantai Prangtritis<br>Bantul</th>
                                                </tr>
                                <tr>
                                <th><img src="pict/pindul.jpg" width="180px" height="180px" border="1px" align="center" hspace="10"/><br>Goa Pindul<br>Gunung Kidul</th>
                                <th><img src="pict/alun.jpg" width="180px" height="180px" border="1px" align="center" hspace="10"/><br>Alun-alun Kidul<br>Yogyakarta</th>
                                </tr>
                </table>
                </div>
</div>
</body>
</html>

Hasil Output


 

Tidak ada komentar:

Posting Komentar