Sup Daijoubu?
Pada kesempatan kali ini saya akan membuat sebuah katalog simpel menggunakan HTML + CSS, untuk tampilannya adalah sebagai berikut :
Untuk membuat tampilan seperti di atas tentunya diperlukan file HTML & CSS (you dont say :v), berikut adalah file html & css :
1. index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Wall.in</title> | |
</head> | |
<body> | |
<div class="header"> | |
<div class="header-title"> | |
<h1>Wallpaper Store</h1> | |
</div> | |
<ul class="header-menu"> | |
<li><a href="#">Home</a></li> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Contact</a></li> | |
</ul> | |
</div> | |
<div class="content-wrapper"> | |
<div class="card"> | |
<div class="content"> | |
<img class="content-image" src="img/Beebop.PNG"> | |
</div> | |
<div class="content-text"> | |
<h2 class="judul-barang">Wallpaper Cowboy Bebop</h2> | |
<p class="description"> | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor | |
</p> | |
<h3 class="harga">Rp 150.000</h3> | |
<P><a href="" class="button">Buy Now</a></P> | |
</div> | |
</div> | |
<div class="card"> | |
<div class="content"> | |
<img class="content-image" src="img/Killua.jpg"> | |
</div> | |
<div class="content-text"> | |
<h2 class="judul-barang">Wallpaper Killua</h2> | |
<p class="description"> | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor | |
<h3 class="harga">Rp 120.000</h3> | |
<P><a href="" class="button">Buy Now</a></P> | |
</div> | |
</div> | |
<div class="card"> | |
<div class="content"> | |
<img class="content-image" src="img/Moon.jpg"> | |
</div> | |
<div class="content-text"> | |
<h2 class="judul-barang">Wallpaper Spirited Away Moon Exclusive</h2> | |
<p class="description"> | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor | |
<h3 class="harga">Rp 100.000</h3> | |
<P><a href="" class="button">Buy Now</a></P> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
2. style.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: Arial, Helvetica, sans-serif; | |
margin: 0; | |
} | |
.header { | |
background-color: #fff; | |
color: black; | |
top: 0; | |
margin-top: 50px; | |
margin-bottom: 10px; | |
} | |
h1 { | |
text-align: center; | |
font-size: 2.3em; | |
} | |
.header-menu{ | |
list-style: none; | |
margin: 0; | |
padding :0; | |
text-align: center; | |
} | |
.header-menu li{ | |
display: inline; | |
} | |
.header-menu a{ | |
display: inline-block; | |
color: black; | |
padding: 10px; | |
} | |
.card { | |
margin-top: 50px; | |
display: flex; | |
margin-bottom: 100px; | |
} | |
.content { | |
flex: 50%; | |
padding: 10px; | |
} | |
.content-text { | |
flex: 50%; | |
padding: 10px; | |
margin-left: 10px; | |
} | |
.content-image { | |
width: 600px; | |
height: 350px; | |
float: right; | |
} | |
.judul-barang { | |
font-size: 30px; | |
margin-bottom: 15px; | |
} | |
.harga { | |
font-size: 24px; | |
font-weight: 700; | |
margin-top: 15px; | |
} | |
.description { | |
height: left; | |
text-align: justify; | |
word-wrap: break-word; | |
line-height: 1.5; | |
margin-right: 220px; | |
} | |
.beli { | |
display: flex; | |
} | |
.beli p { | |
margin-left: 15px; | |
} | |
.button { | |
cursor: pointer; | |
background-color: #152d35; | |
border-radius: 20px; | |
color: white; | |
text-align: center; | |
text-decoration: none; | |
font-size: 16px; | |
display: inline-block; | |
margin-top: 20px; | |
padding: 15px 20px 15px 20px; | |
} | |
.footer { | |
text-align: center; | |
display: flex; | |
flex-direction: column; | |
background-color: #152d35; | |
color: white; | |
padding: 1rem; | |
align-items: center; | |
} |
Untuk website dapat diakses pada link iniWall.in
Sekian yang dapat saya sampaikan mohon maaf apabila ada kesalahan dalam penulisan
Comments
Post a Comment