Attractive Search Box Design Using CSS and HTML

Attractive Search Box Design Using CSS and HTML

In this video, you are going to learn how to design an attractive search box only using HTML and CSS. You can use this search box for a full-screen search page or an element of a page. So Let's see how to create this search box design.

In this video, you are going to learn how to design an attractive search box only using HTML and CSS. You can use this search box for a full-screen search page or an element of a page. So Let's see how to create this search box design.

Subscribe: https://www.youtube.com/channel/UCNDmzGYwwT3rdY3xQuW8QOA

Source code

index.html


<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Search Box</title>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css">
  </head>
  <body>

    <!--search box start-->
    <form class="search-box" action="" method="">
      <input type="text" name="" value="" placeholder="Search">
      <button class="search-btn" type="button" name="button">
       <i class="fas fa-search"></i>
      </button>
    </form>
    <!--search box end-->

  </body>
</html>

style.css



body{
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
  background: #eee;
}

.search-box{
  font-family: "Candara", sans-serif;
  position: absolute;
  background: #333A45;
  height: 40px;
  padding: 10px;
  border-radius: 40px;
  box-shadow: 0 0 25px 0 rgba(51, 58, 69, 0.4);
}

.search-box input{
  border: none;
  background: none;
  outline: none;
  float: left;
  padding: 0;
  color: #fff;
  font-size: 20px;
  line-height: 40px;
  width: 0px;
  transition: all 0.8s;
}

.search-box:hover input{
  width: 240px;
  padding: 0 6px;
}

.search-box input:focus{
  width: 240px;
  padding: 0 6px;
}

.search-btn{
  border: none;
  background: none;
  outline: none;
  width: 40px;
  margin-top: -21px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.search-btn i{
  z-index: 1;
  background: #00B894;
  font-size: 30px;
  color: #333A45;
  padding: 25px;
  border-radius: 50px;
  box-shadow: 0 0 25px 0 rgba(0, 184, 148, 0.4);
}

html css

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

HTML and CSS Tutorial for Beginners | HTML and CSS | HTML CSS Tutorial

HTML and CSS Tutorial for Beginners will provide you with a detailed and comprehensive knowledge about HTML. In this HTML Tutorial for Beginners you will learn HTML concepts from scratch and also how to create your first web page using HTML Tags.

HTML and CSS Tutorial for Beginners | HTML and CSS | HTML CSS Tutorial

HTML and CSS Tutorial for Beginners will provide you with a detailed and comprehensive knowledge about HTML. In this HTML Tutorial for Beginners you will learn HTML concepts from scratch and also how to create your first web page using HTML Tags.

Creating a CSS Visual Cheatsheet

The other day one of our students asked about possibility of having a CSS cheatsheet to help to decide on the best suited approach when doing this or that layout.

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

RESPONSIVE Personal PORTFOLIO Website HTML CSS And JAVASCRIPT

Responsive Personal Portfolio Website using HTML CSS & JavaScriptImages: https://bit.ly/353QF2ZDemo: https://edem-portfolio.netlify.app/Source Code: https://...