<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flexbox Navigation</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div class="wrapper">
<img class="image" src="https://source.unsplash.com/1000x500">
<nav class="nav">
<ul class="list">
<li class="item arrow">
<a href="#" class="link">←</a>
</li>
<li class="item">
<a href="#" class="link">Lorem ipsum dolor sit amet, consectetur adipisicing</a>
</li>
<li class="item">
<a href="#" class="link">Consectetur adipisicing</a>
</li>
<li class="item">
<a href="#" class="link">Lorem ipsum dolor sit amet</a>
</li>
<li class="item">
<a href="#" class="link">Lorem ipsum dolor sit amet, consectetur</a>
</li>
<li class="item arrow">
<a href="#" class="link">→</a>
</li>
</ul>
</nav>
</div>
</body>
</html>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
background: #ED5276;
}
.wrapper {
width: 90%;
margin: auto;
}
.image {
width: 100%;
height: 500px;
object-fit: cover;
border-radius: 5px;
}
.nav {
display: flex;
}
.list {
width: 100%;
list-style: none;
display: flex;
border-radius: 5px;
background: rgba(255,255,255,.5);
}
.item {
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
flex: 2;
}
.item.arrow {
flex: 1;
font-size: 28px;
}
.item:hover {
background: rgba(255,255,255,.1);
}
.link {
text-align: center;
text-decoration: none;
color: #000;
}