Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Navbar use grid instead of list
Browse files Browse the repository at this point in the history
  • Loading branch information
NaMLiM committed Mar 12, 2020
1 parent 3ef2450 commit f81851e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 36 deletions.
45 changes: 30 additions & 15 deletions css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,49 @@ html{
margin: 0 3% 0 3%;
}

.logo img{
width: 10%;
height: 5%;
overflow: hidden;
.nav-1{
display: grid;
justify-content: end;
align-content: center;
grid-auto-flow: column;
grid-gap: 10px;
}

.nav-1 a{
text-decoration: none;
}

nav{
list-style-type: none;
margin: 0;
padding: 0;
.nav-2{
display: grid;
min-height: 100px;
grid-auto-flow: column;
grid-gap: 20px;
}

.logo{
display: grid;
justify-content: start;
align-content: center;
overflow: hidden;
background-color: #333;
}

.nav-2 li{
display: inline;
.navlink{
display: grid;
justify-content: end;
align-content: center;
grid-auto-flow: column;
grid-gap: 10px;
}

.nav-2 a{
display: block;
.navlink a{
padding: 8px;
background-color: #ffffff;
text-decoration: none;
transition: 300ms;
float: right;
border-radius: 2px;
}

.nav-2 a:hover{
.navlink a:hover{
background-color: orange;
color: #ffffff;
}
Expand Down
37 changes: 16 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,24 @@
<body>
<header>
<div class="nav-1">
<ul>
<li><a href="#">PERUSAHAAN</a></li>
<li><a href="#">KARIR</a></li>
<li><a href="#">id_ID</a></li>
<li><a href="#">en_EN</a></li>
</ul>
<br>
<a href="#">PERUSAHAAN</a>
<a href="#">KARIR</a>
<a href="#">id_ID</a>
<a href="#">en_EN</a>
</div>
<nav>
<div class="logo">
<a href="index.html">
<img src="navicon.png">
</a>
</div>
<div>
<div class="nav-2">
<ul>
<li><a href="index.html">HOME</a></li>
<li><a href="#">RUANG PUBLIK</a></li>
<li><a href="#">PRODUK & LAYANAN</a></li>
<li><a href="#">HUBUNGI</a></li>
<li><a href="#">PENGADAAN</a></li>
</ul>
<div class="nav-2">
<div class="logo">
<a href="index.html">
<img src="navicon.png">
</a>
</div>
<div class="navlink">
<a href="index.html">HOME</a>
<a href="#">RUANG PUBLIK</a>
<a href="#">PRODUK & LAYANAN</a>
<a href="#">HUBUNGI</a>
<a href="#">PENGADAAN</a>
</div>
</div>
</nav>
Expand Down

0 comments on commit f81851e

Please sign in to comment.