Помогите скруглить кнопку
Сразу обозначу проблему. Имеется Header, в котором находится поисковая строка. В поисковой строке есть небольшая иконка в блоке search-box, которая скругляется с помощью border-radius. Но по какой-то причине она не хочет становится круглой при значении 50%. Помогите разобраться Имеется такой HTML:
<link rel="stylesheet" type="text/css" href="CSS/main.css">
<!DOCTYPE html>
<html lang="ru">
<head>
<script defer src="http://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
</head>
<body>
<header>
<div class="header">
<a class="logo" href="./index.html"> <img src="img/image.png" width="70"/></a>
<div class="search-box">
<input class="search-txt" type="text" name="" placeholder="Type to search">
<a class="search-btn" href="#">
<i class="fas fa-search"></i>
</a>
</div>
<div class="header-right">
<a class="active" href="#home">Главная</a>
<a href="#contact">Контакты</a>
<a href="#about">О нас</a>
</div>
</div>
</header>
<main class="main">
</main>
</body>
</html>
И такой CSS:
.header {
overflow: hidden;
background-color: transparent;
border-bottom: none;
padding: 20px 10px;
}
/* Стиль ссылок шапки */
.header a {
float: left;
color: black;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 18px;
line-height: 25px;
border-radius: 4px;
}
.search-box{
position: absolute;
left: 500px;
height: 40px;
border-radius: 40px;
background: #2f3640;
padding: 10px;
}
.search-box:hover > .search-txt{
width: 240px;
padding: 0 6px;
}
.search-box:hover > .search-btn{
background: white;
}
.search-btn{
color: white;
float: right;
width: 18px;
height: 18px;
border-radius: 50%;
background: #2f3640;
display: flex;
justify-content: center;
align-items: center;
transition: 0.4s;
}
.search-txt{
border: none;
background : none;
outline: none;
float: left;
padding: 0;
color: white;
font-size: 16px;
transition: 0.4s;
line-height: 40px;
width: 0px;
}
Источник: Stack Overflow на русском