HOW TO CREATE A SEARCH INPUT BAR


<!DOCKTYPE HTML>
<HTML>
<HEAD>
<style>
input[type=text] {
 width:100%
 box-sizing:border-box;
 border:2px solid #ccc;
 border-radius:4px;
 font-size:16px;
 background-color:white;
 background-position:10px 10px;
 background-repeat:no-repeat;
 padding:12px 20px 12px 40px;
}
 .icon-container{
 position: relative;
 width:100%;
}
 .icon-container.fa-search{
 position: absolute;
 top:12px;
 left:15px;
 font-size:20px;
 color:#ccc;
}
</style>
<link rel="stylesheet"href="<i class"fa-brands fa-docker"></i>'>
</head>
<body>

<h2>Input field with an icon inside </h2>
 
<form>
 <div class="icon-container">
 <i class="fa fa-search"></i>
 <input type="text" name="search"placeholder="Search..">
</div>
</form>

</body>
</html>


Comments

Popular posts from this blog

HOW TO CREATE DROPDOWN MENU

How to merge a table.