HTML CODE:
<!DOCTYPE html>
<html>
<head>
<title>page</title>
<link rel="stylesheet" type="text/css" href="1.page.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
</head>
<body>
<!-- Top -->
<header id="top" class="grid">
<div class="logo">
<p class="logo-top">pıerrick calvez</p>
<p class="logo-bottom">Studio Ltd.</p>
</div>
<!--Menu-->
<div class="menu">
<ul>
<li><a href="#">Diary</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Publications</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
<!-- Icon -->
<div class="icon">
<i class="fas fa-check-double"></i>
<i class="fas fa-envelope"></i>
<i class="fas fa-wifi"></i>
<i class="fas fa-lock"></i>
</div>
</header>
<!-- Main -->
<main id="main" class="grid">
<div class="image">
<ul>
<li>
<p>Locaste</p>
<img src="https://images.pexels.com/photos/1105766/pexels-photo-1105766.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>The Diomand Age</p>
<img src="https://images.pexels.com/photos/957312/chess-checkmated-chess-pieces-black-white-957312.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Shamgai Year 1</p>
<img src="https://images.pexels.com/photos/114820/pexels-photo-114820.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Wine(s)</p>
<img src="https://images.pexels.com/photos/764880/pexels-photo-764880.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Making-of v.5</p>
<img src="https://images.pexels.com/photos/702139/pexels-photo-702139.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>2011-2001</p>
<img src="https://images.pexels.com/photos/248280/pexels-photo-248280.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>The Jagged Orbit</p>
<img src="https://images.pexels.com/photos/277017/pexels-photo-277017.png?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Festival Scope</p>
<img src="https://images.pexels.com/photos/52500/horse-herd-fog-nature-52500.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Visual Identity</p>
<img src="https://images.pexels.com/photos/57905/pexels-photo-57905.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Unreleased</p>
<img src="https://images.pexels.com/photos/162389/lost-places-old-decay-ruin-162389.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Project Manager</p>
<img src="https://images.pexels.com/photos/220836/pexels-photo-220836.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
<li>
<p>Compueter Arts</p>
<img src="https://images.pexels.com/photos/33283/stack-of-books-vintage-books-book-books.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
</li>
</ul>
</div>
</main>
</body>
</html>
CSS CODE:
body{
padding: 3%;
margin: 0;
background-color: #262626;
}
/* HEADER */
#top{
display: grid;
box-sizing: border-box;
position: relative;
grid-template-columns: 2fr 8fr 1fr;
grid-template-rows: 50px;
grid-template-areas:
"logo menu icon"
}
/* Logo */
.logo{
grid-area: logo;
margin-left:50px;
display: grid;
justify-items: center;
}
.logo p{
color: #fff;
padding:0;
margin: 0;
cursor: pointer;
}
.logo > .logo-top{
text-decoration: none;
text-transform: uppercase;
font-family:Arial;
font-weight: bold;
font-size: 20px;
}
.logo > .logo-bottom{
text-decoration: none;
font-family:Vivaldi;
font-size: 20px;
}
/* Menu */
.menu ul{
display:flex;
box-sizing: border-box;
}
.menu ul li{
list-style: none;
padding: 0 30px 0 0;
box-sizing: border-box;
}
.menu ul li a{
display: block;
position: relative;
text-decoration: none;
color: #666666;
font-family:arial;
transition:.5s;
}
.menu ul li a:hover{
color: #fff;
}
.menu ul li a:before{
content: "";
display: block;
width: 100%;
height: 1.5px;
position: absolute;
bottom: -40%;
background-color: #fff;
transform: scaleX(0);
transition: .5s;
}
.menu ul li a:hover:before{
transform: scaleX(1);
}
/* Icon */
.icon{
color:#666666;
margin-top:-4%;
}
/* MAIN */
#main{
padding-top: 25px;
}
/* Image */
.image img{
width: 100%;
height: 100%;
box-sizing: border-box;
box-shadow: -5px 5px 20px #000,5px 5px 20px #000;
cursor: pointer;
}
.image ul{
list-style: none;
margin: 0;
padding:0;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-gap: 1px;
}
.image p{
background:#f2f2f2;
padding: 0;
margin: 0;
width: 100%;
height: 15%;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: #333;
font-family: sans-serif;
font-size: 1.1em;
transition: .5s;
cursor: pointer;
}
.image ul li:nth-child(5){
height:100%;
}
.image ul li:hover p{
color: #f2f2f2;
background-color: #333
}
.image ul li img:hover{
background: black;
opacity: 0.9;
}
/* Media */
@media(min-width: 600px) and (max-width:1000px){
.image ul{
list-style: none;
margin: 0;
padding:0;
display: grid;
grid-template-columns: repeat(2,minmax(auto,28em));
grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
grid-gap: 1px;
}
#top{
display: grid;
box-sizing: border-box;
position: relative;
grid-template-columns: 1fr;
grid-template-rows: 1fr 1fr;
justify-items: center;
grid-template-areas:
"logo logo"
"menu menu"
}
.icon{
display: none;
}
}
@media(min-width: 200px) and (max-width:600px){
.image ul{
list-style: none;
margin: 0;
padding:0;
display: grid;
grid-template-columns: repeat(1,minmax(auto,40em));
grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
grid-gap: 1px;
}
#top{
display: grid;
box-sizing: border-box;
position: relative;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
justify-items: center;
grid-template-areas:
"logo"
"menu"
}
.icon{
display: none;
}
}
changed box size when i used anchor tag for navigation ?? any solution ??
LikeLike
This is real awesome
LikeLike