Close Menu

    Subscribe to Updates

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

    What's Hot

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025

    How to create Valentine’s Love Button Animation using HTML CSS and JS

    23 June 2025

    How to create Magic Indicator Menu using HTML CSS and JS

    20 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

    HTML & CSS

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025
    JavaScript

    How to create Valentine’s Love Button Animation using HTML CSS and JS

    23 June 2025
    JavaScript

    How to create Magic Indicator Menu using HTML CSS and JS

    20 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 202416K 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 KFC Landing Page using HTML & CSS

    12 January 2024

    How to Make A Quiz Application with a Timer using HTML CSS and JavaScript

    14 December 2023

    How to make Scroll Drive All The Things using HTML CSS & JavaScript

    28 April 2024

    Top 10 Most Popular Programming Languages of All Time

    25 January 2024
    Latest Post

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025

    How to create Valentine’s Love Button Animation using HTML CSS and JS

    23 June 2025

    How to create Magic Indicator Menu using HTML CSS and JS

    20 June 2025

    How to create Awesome Cool Loading Animation using HTML CSS and JS

    16 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