Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How to create Login and Signup Form using HTML CSS and JS

    9 June 2025

    How to create Impossible light bulb using HTML CSS and JS

    5 June 2025

    How to create Animated Rubik Cube using HTML CSS and JS

    3 June 2025
    Facebook X (Twitter) Instagram YouTube Telegram Threads
    Coding StellaCoding Stella
    • Home
    • Blog
    • HTML & CSS
      • Login Form
    • JavaScript
    • Hire us!
    Coding StellaCoding Stella
    Home - HTML & CSS - How to make Awesome Search Bar 2 using HTML & CSS
    HTML & CSS

    How to make Awesome Search Bar 2 using HTML & CSS

    Coding StellaBy Coding Stella4 April 2025No Comments3 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Email WhatsApp Copy Link

    Let’s create an Awesome Search Bar 2 using HTML and CSS. This stylish and modern search bar will feature smooth animations and a clean design to enhance the user interface of any website.

    We’ll use:

    • HTML to structure the search bar elements.
    • CSS to style it with hover effects, smooth transitions, and a minimal layout.

    Whether you’re building a personal portfolio, a blog, or a business website, this Awesome Search Bar is a great way to practice front-end skills and add a professional touch to your projects. Let’s get started and make your UI look sleek and functional! 🔍✨

    HTML :

    This HTML sets up a simple search bar with a Font Awesome search icon; when combined with the linked CSS, it shows a circular button that expands into a search input when hovered, creating a smooth and interactive search UI.

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Search Bar | @coding.stella</title>
        <link rel="stylesheet" href="./style.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    </head>
    <body>
        <form action="">
            <input type="search" placeholder="Search here ...">
            <i class="fa fa-search"></i>
        </form>
    </body>
    </html>

    CSS :

    This code creates a centered circular search box that expands into a full-width input field with a search icon when hovered; it uses CSS transitions for smooth animation and styling for a modern, clean look with purple accent.

    body {
        padding: 0;
        margin: 0;
        height: 100vh;
        width: 100%;
        background: #252432;
        /* background: #8c52ff; */
    }
    
    form{
        position: relative;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        transition: all 1s;
        width: 50px;
        height: 50px;
        background: white;
        box-sizing: border-box;
        border-radius: 25px;
        border: 4px solid white;
        padding: 5px;
    }
    
    input{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;;
        height: 42.5px;
        line-height: 30px;
        outline: 0;
        border: 0;
        display: none;
        font-size: 1em;
        border-radius: 20px;
        padding: 0 20px;
    }
    
    .fa{
        box-sizing: border-box;
        padding: 10px;
        width: 42.5px;
        height: 42.5px;
        position: absolute;
        top: 0;
        right: 0;
        border-radius: 50%;
        color: #8c52ff;
        text-align: center;
        font-size: 1.2em;
        transition: all 1s;
    }
    
    form:hover{
        width: 300px;
        cursor: pointer;
    }
    
    form:hover input{
        display: block;
    }
    
    form:hover .fa{
        background: #8c52ff;
        color: white;
    }

    In conclusion, building an Awesome Search Bar 2 using HTML and CSS is a simple yet effective way to upgrade your website’s design. With just a bit of structure and styling, you can create a modern and interactive element that improves user experience. Keep experimenting and making your UI stand out! 💡

    If your project has problems, don’t worry. Just click to download the source code and face your coding challenges with excitement. Have fun coding!

    Animation navigation search bar Web Development
    Share. Copy Link Twitter Facebook LinkedIn Email WhatsApp
    Previous ArticleHow to create Valentine’s Day Card using HTML CSS & JavaScript
    Next Article How to make Glassmorphism Login form using HTML & CSS
    Coding Stella
    • Website

    Related Posts

    JavaScript

    How to create Login and Signup Form using HTML CSS and JS

    9 June 2025
    JavaScript

    How to create Impossible light bulb using HTML CSS and JS

    5 June 2025
    JavaScript

    How to create Animated Rubik Cube using HTML CSS and JS

    3 June 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Trending Post

    Master Frontend in 100 Days Ebook

    2 March 202419K Views

    How to make Modern Login Form using HTML & CSS | Glassmorphism

    11 January 202417K Views

    How to make I love you Animation in HTML CSS & JavaScript

    14 February 202415K Views

    How to make Valentine’s Day Card using HTML & CSS

    13 February 202412K Views
    Follow Us
    • Instagram
    • Facebook
    • YouTube
    • Twitter
    ads
    Featured Post

    How to make Clean Toast Notifications using HTML & CSS

    16 March 2024

    Frontend vs Backend : The Face and Brains of the Internet

    17 January 2024

    5 Simple Ways to Center a Div in CSS

    24 January 2024

    How to make 10 Different Pulsing loading effect using HTML & CSS

    23 January 2024
    Latest Post

    How to create Login and Signup Form using HTML CSS and JS

    9 June 2025

    How to create Impossible light bulb using HTML CSS and JS

    5 June 2025

    How to create Animated Rubik Cube using HTML CSS and JS

    3 June 2025

    How to Create Animated Bicycle Product Card using HTML & CSS

    1 June 2025
    Facebook X (Twitter) Instagram YouTube
    • About Us
    • Privacy Policy
    • Return and Refund Policy
    • Terms and Conditions
    • Contact Us
    • Buy me a coffee
    © 2025 Coding Stella. Made with 💙 by @coding.stella

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Looks like you're using an ad blocker. We rely on advertising to help fund our site.
    Okay! I understood