Hi I’ve been trying to make a navbar about 20 min which should have 50% height of screen
basic.css
.container > li {
padding: 10px;
text-align: center;
font-size: 2em;
color: #ffeead;
box-sizing: border-box;
background-color: #96ceb4;
list-style-type: none;
}
html, body {
background-color: #ffeead;
margin: 10px;
height:100%;
}
.container {
padding: 0;
}
.search-input {
background: #ff6e68;
border: 0;
width: 100%;
outline: 0;
background: transparent;
border-bottom: 1px solid #ffeead;
color: #ffeead;
}
::placeholder{
color: #ffeead;
}
.search-input:focus {
outline: none;
}
.container > li {
background-color: #96ceb4;
}
/*.container > div:nth-child(2) {
background-color: #ff6f69;
}
.container > div:nth-child(3) {
background-color: #88d8b0;
}
.container > div:nth-child(4) {
background-color: #96ceb4;
}
*/
index.css
.container {
border: 5px solid #ffcc5c;
display: flex;
height:50%;
}
Index.html
<html>
<head>
<link rel="stylesheet" href="basic.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<nav id="wrapper">
<ul class="container">
<li>Home</li>
<li>Profile</li>
<li class="search">
<input type="text" class="search-input" placeholder="Search">
</li>
<li>Logout</li>
</ul>
</nav>
</body>
</html>
I will be thankful if you help me