Desain Layout Web
<header>
<div id="header">
<h1>
Popon Web
</h1>
</div>
</header>
<nav>
<ul>
<li><a href="">Beranda</a></li>
<li><a href="">Product</a></li>
<li><a href="">Contact</a></li>
<li><a href="">About</a></li>
</ul>
</nav>
<div class="sidebar">
<h3>
My App
</h3>
<ul>
<li><a href="#">Qr code</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Stream</a></li>
<li><a href="#">Calendar</a></li>
</ul>
</div>
<div class="content">
<h2>
MAKANAN BETAWI
</h2>
<center>
<img src="keraktelor.jpg" alt="">
</center>
<p>
Kerak telor terbuat dari campuran telur, ketan, dan ebi. Masakan ini sudah ada sejak tahun 1970-an yang disajikan untuk pesta besar.<br><br><hr>
</p>
<div id="img2">
<center>
<img src="asinan.jpg" alt="">
</center>
<p>
Asinan khas Betawi menggunakan sayuran sebagai bahan utamanya. Setelah itu, disiram campuran bumbu kacang, cuka, dan cabai.<br><br><hr>
</p>
</div>
</div>
<div id="sidebark">
<h2>
IKLAN
</h2>
<p>
lorem
</p>
</div>
<footer>
<h1>
THANK YOU!!!
</h1>
<ul>
<li><a href="https://www.instagram.com/pop0n_21/">MY INSTAGRAM</a></li>
<li><a href="">MY BLOGSPOT</a></li>
<li><a href="">MY FACEBOOK</a></li>
</ul>
</footer>
* {
margin: 0;
padding: 0;
}
#header {
background-color: burlywood;
padding: 20px;
text-align: center;
border-bottom: 5px solid black;
border-radius: 20px;
margin: 20px 10px;
}
nav {
background-color: cornflowerblue;
justify-content: center;
display: flex;
padding: 20px 0;
align-items: center;
border-bottom: 5px solid black;
border-radius: 20px;
margin: 20px 10px;
}
nav ul {
display: flex;
background-color: cornflowerblue;
list-style: none;
justify-content: space-between;
width: 30%;
}
nav ul li a {
color: crimson;
text-decoration: none;
}
nav ul li a:hover {
color: black;
}
.sidebar h3 {
text-align: center;
padding: 10px;
}
.sidebar {
background-color: cadetblue;
border: 5px;
height: 500px;
border-radius: 20px;
border-bottom: 5px solid black;
margin: 20px;
width: 20%;
float: left;
}
.sidebar ul li {
text-align: center;
list-style: none;
}
.sidebar ul li a {
text-decoration: none;
color: brown;
}
.sidebar ul li a:hover {
color: black;
}
.content h2 {
text-align:center;
padding:10px;
background-color: rgb(89, 171, 7);
border-top-right-radius: 10px;
border-top-left-radius: 10px;
padding: 10px;
margin-bottom: 10px;
}
.content {
background-color: chartreuse;
margin-top: 20px;
float: left;
width: 50%;
height: 1000px;
border-radius: 20px;
border-bottom: 5px solid black;
margin-right: 20px;
margin-bottom: 50px;
}
.content img {
width: 450px ;
height: 300px;
margin-bottom: 10px;
}
#img2 {
margin-top: 20px;
}
#sidebark h2 {
text-align:center;
padding:10px;
}
#sidebark {
float: left;
background-color: blueviolet;
height: 500px;
width: 25%;
margin-top: 20px;
border-radius: 20px;
border-bottom: 5px solid black;
}
footer {
clear: both;
background-color: aqua;
height: 200px ;
margin: 0 10px;
border-radius: 20px ;
border-bottom: 5px solid black ;
margin-bottom: 10px;
}
footer h1 {
text-align: center;
padding: 10px;
}
footer ul li {
text-decoration: none;
margin-top: 10px;
}
footer ul li a {
text-decoration: none;
}
footer ul li a:hover {
color: red;
}
@media (max-width: 768px) {
.content img {
width: 300px ;
}
#sidebark {
width: 20%;
}
}
@media (max-width: 560px) {
.content img {
width: 200px;
}
#sidebark {
clear: both;
width: 390px;
margin: 10px 10px;
}
.content {
clear: both;
width: 390px;
margin: 10px 10px;
}
.sidebar {
width: 390px;
margin: 10px 10px;
}
}
Komentar
Posting Komentar