<body>
<nav>
	<ul>
		<li><a href="#link">Home</a></li>
		<li><a href="#link">News</a></li>
		<li><a href="#link">About</a></li>
		<li class="search">
			Search
			<div class="search-bar">
				<form>
					<input type="text" name="search" placeholder="Search...">
				</form>
			</div>
		</li>
	</ul>
</nav>
</body>
nav{
	background-color:#1abc9c;
}
nav ul{
	margin:0;
	padding:0;
	list-style-type:none;
}
nav li{
	display:inline-block;
}
nav li a{
	display:inline-block;
	text-decoration:none;
	color:white;
	padding:14px 16px;
}
.search{
	position:relative;
	display:inline-block;
	color:white;
	padding:14px 16px;
	float:right;
}
.search-bar{
	position:absolute;
	display:none;
	right:0;
	top:45px;
}
input[type=text] {
    width: 130px;
    box-sizing: border-box;
    border: 1px solid black;
    border-radius: 4px;
    font-size: 16px;
    outline:none;
    padding: 12px 14px;
    transition: width 0.4s ease-in-out;
}
nav li:hover{
	background-color:orange;
}
.search:hover{
	background-color:lightpink;
	color:black;
}
.search:hover .search-bar{
	display:block;
}
form input[type="text"]:focus{
	width:500px;
	background-color:lightpink;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.