Desain WEB with CSS


hem ne contoh dasar web dengan CSS.
nah kite buat dulu CSSnya=>
#wrapper {
margin: auto;
width: 756px;
border: 1px solid Blue;
}
#header {
height: 70px;
border: 1px solid green;
}
#inner {
float: left;
margin: 5px 0;
border: 1px solid black;
}
#sidebar {
float: left;
margin-right: 20px;
width: 180px;
height: 330px;
border: 1px solid red;
}
#aaaa {
float: left;
width: 550px;
height: 330px;
border: 1px solid green;
}
#top{
height: 70px;
border: 1px solid red;
}
#content {
float: left;
margin-right: 20px;
width: 320px;
height: 250px;
border: 1px solid red;
}
#right {
float: right;
width: 205px;
height: 200px;
border: 1px solid green;
}
#footer {
clear: both;
height: 50px;
border: 1px solid green;
}

abiz ntuh ne programnya=>
<!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" xml:lang="en" lang="en">

<head>
<title>Desain Layout Halaman Web</title>
<link rel="stylesheet" href="mystyle1.css" type="text/css" />
</head>

<body>
<div id="wrapper">
<div id="header">
Header</div>
<div id="inner">
<div id="sidebar">
Sidebar
</div>
<div id="aaaa">
<div id="top">
Top
</div>
<div id="content">
Content
</div>
<div id="right">
Right
</div>
</div>
</div>
<div id="footer">
Footer
</div>
</div>

</body>
</html>


 

nah ini baru aplikasinya, upz contoh dikit waelah...
CSS=>
#wrapper {
margin: auto;
width: 1000px;
border: 0;
}
#header {
height:120px;
border: 1px solid blue;
margin-bottom:2px;
background:blue url('header2.jpg');
}
#logo {
float: left;
height: 63px;
width: 61px;
margin-top:20px;
margin-left:50px;
border: 0;
background:red url('logo.jpg');
}
#Elektro {
float:left;
height: 35px;
width:300px;
margin-top:35px;
margin-left:5px;
}
#depan {
float: right;
height: 120;
width:400px;
border: 0;
}
#atas {
float: left;
height:25px;
width:350px;
margin-left:30px;
margin-top:2px;
border: 0;
}
#search {
clear:both;
float: right;
height: 20px;
width:300px;
margin-top:67px;
margin-right:20px;
border: 0;
}
#search1 {
float: left;
height: 15px;
width:120px;
margin-left:50px;
margin-top:4px;
border: 0;
}
#search2 {
float: right;
height: 17px;
width:110px;
margin-right:2px;
margin-top:4px;
border: 1px solid white;
background:white;
}
#inner {
float: left;
border: 0;
}
#sidebar {
float: left;
margin-right: 0px;
width: 250px;
height:420px;
border: 1px solid blue;
background:blue url('sidebar.jpg');
}
#Inner2 {
float: left;
width: 745px;
height: 420px;
border: 0;
}
#top{
height: 80px;
border: 0;
background:blue url('header5.jpg');
}
#content {
float: left;
margin-top:10px;
margin-right:15px;
margin-left:15px;
width: 460px;
height: 323px;
border: 0;
}

#Rightbot {
float: left;
width: 250px;
height: 26px;
margin-top:10px;
border: 0;
list-style-position:inside;
}
#footer {
clear: both;
height: 80px;
border: 1px solid blue;
background:blue url('footer.jpg');
}
.style2 {
font-size: 24px;
font-weight: bold;
color: #000099;
}
.style3 {
color: #0000CC;
font-weight: bold;
}
.style4 {
font-family: "Times New Roman", Times, serif;
font-size: xx-large;
color: #FFFFFF;
font-weight: bold;
}
.style6 {
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
.style7 {color: #FFFFFF}
.style8 {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
font-weight: bold;
color: #FFFFFF;
}
.style10 {
color: #FFFFFF; font-size: 12px;
}
.style11 {
color: #000066;
font-weight: bold;
}
#leftmenu ul {
width: 250px;
list-style-type:none;
padding:0; margin:0;
}
#leftmenu a:link, #leftmenu a:visited, #leftmenu a:active {
padding-left: 15px;
text-decoration: none;
}
#leftmenu a {
padding: 5px 0px 5px 15px; display: block;
background: blue url('button.jpg');
margin: 0px 0px 1px; color: #ffffff;
}
#leftmenu a:hover {
background: #000066 no-repeat left center; color: #ffffff
}


nah ne programnya=>
<!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" xml:lang="en" lang="en">
<head>
<title>Desain Layout UM</title>
<link rel="stylesheet" href="mystyle2.css" type="text/css" />
</head>

<body>
<div id="wrapper">
<div id="header">
<div id="logo.jpg">
</div>
<div class="style4" id="Elektro">TEKNIK ELEKTRO
</div>
<div id="depan">
<div class="style6" id="atas">
<div align="right" class="style7"><a href="http://localhost/Tugasku/mod3tgs2.html" target="_blank" class="style7">Home</a> | <a href="http://localhost/Tugasku/mod3tgs2.html" target="_blank" class="style7">Sitemap</a> | <a href="http://localhost/Tugasku/mod3tgs2.html" target="_blank" class="style7">RSS</a> | <a href="http://localhost/Tugasku/mod3tgs2.html" target="_blank" class="style7">Contact</a> | <a href="http://localhost/Tugasku/mod3tgs2.html" target="_blank" class="style7">About Us</a> </div>
</div>
<div id="search">
<div class="style7" id="search1">
<div align="right"><em><strong>
Search
</strong></em></div>
</div>
<div id="search2"></div>
</div>
</div>
</div>
<div id="inner">
<div id="sidebar">
<div id="leftmenu">
<ul>
<li>
<div align="center"><a href="http://localhost/Tugasku/mod3tgs2.html">Home</a></div>
</li>
<li>
<div align="center"><a href="http://localhost/Tugasku/mod3tgs2.html">News &amp; Media </a></div>
</li>
<li>
<div align="center"><a href="http://localhost/Tugasku/mod3tgs2.html">Tutorial</a></div>
</li>
<li>
<div align="center"><a href="http://localhost/Tugasku/mod3tgs2.html">Tips and Trik</a></div>
</li>
<li>
<div align="center"><a href="#">Download</a></div>
</li>
</ul>
</div>
</div>
<div id="Inner2">
<div id="top">
</div>
<div id="content">
<p class="style2">Lomba Desain WEB</p>
<p class="style3">Lorem ipsum dolor sit amet, consectetur adipisicing elit,<br />
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br />
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris<br />
nisi ut aliquip ex ea commodo consequat.</p>
<p class="style3">Lorem ipsum dolor sit amet, consectetur adipisicing elit,<br />
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br />
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris<br />
nisi ut aliquip ex ea commodo consequat. </p>
</div>
<div id="right">
</div>
<div id="Rightbot">
<div align="center" class="style11"><u>TEKNIK ELEKTRO UM</u>
</div>
</div>
</div>
<div id="footer">
</div>
</div>
</div>
</body>
</html>
met mencoba ajeh.....





0 komentar:

Posting Komentar