Creating a Myntra Clone using HTML, CSS & JavaScript (Source Code)

Faraz

By Faraz -

Learn how to create a Myntra clone from scratch using HTML, CSS, and JavaScript. Build your own fashion e-commerce site today!


Creating a Myntra Clone using HTML, CSS & JavaScript.jpg

Table of Contents

  1. Project Introduction
  2. HTML Code
  3. CSS Code
  4. JavaScript Code
  5. Conclusion
  6. Preview

In this blog post, we will delve into creating a Myntra clone using HTML, CSS, and JavaScript. We will cover the essential steps to replicate the functionality and design of this popular e-commerce platform. Whether you're an aspiring web developer or just curious about how such websites work, this guide will provide valuable insights.

Getting Started

To embark on our journey of creating a Myntra clone, we need to set up our development environment properly. Here's how:

  1. Choose a Code Editor: Select a code editor like Visual Studio Code, Sublime Text, or Atom for a smooth development experience.
  2. Initialize Your Project: Create a new project folder and set up the necessary files (index.html, styles.css, script.js).
  3. Link Files: Link your HTML file to the CSS and JavaScript files using <link> and <script> tags.

Source Code

Step 1 (HTML Code):

To get started, we will first need to create a basic HTML file. In this file, we will include the main structure for our myntra clone website.

After creating the files just paste the following codes into your file. Make sure to save your HTML document with a .html extension, so that it can be properly viewed in a web browser.

Here's a breakdown of the code:

1. <!DOCTYPE html>: This declaration specifies the document type and version of HTML being used (HTML5).

2. <html lang="en">: The root element of the HTML document, indicating that the page is written in English ("en").

3. <head>: This section contains metadata and links to external resources that are not displayed on the page itself.

  • <meta charset="UTF-8">: Specifies the character encoding for the document as UTF-8, which includes support for a wide range of characters.
  • <meta http-equiv="X-UA-Compatible" content="IE=edge">: Instructs Internet Explorer to use its latest rendering engine.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0">: Defines the viewport settings for responsive design.
  • <link rel="shortcut icon" href="" type="image/x-icon">: Specifies the favicon (the small icon displayed in the browser tab), but the href attribute is empty, so no icon is specified.
  • <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">: Links to an external stylesheet for including Font Awesome icons.
  • <link rel="icon" type="image/png" href=".../Images/myntraclone/logo.png"/>: Specifies another icon, possibly for mobile devices.
  • <link rel="stylesheet" href="styles.css">: Links to an external CSS file named "styles.css."
  • <title>Online Shopping for Women, Men, Kids Fashion & Lifestyle - Myntra</title>: Sets the title of the web page displayed in the browser's title bar.

4. <body>: This section contains the visible content of the web page.

  • <nav>: Represents the website's navigation menu.
  • <div class="men-section-items visibility">: This section appears to contain categories and subcategories for men's clothing and accessories.
  • <div class="women-section-items visibility">: Similar to the men's section, but for women's clothing and accessories.
  • <div class="kids-section-items visibility">: Contains categories for kids' clothing and accessories.
  • <div class="home-section-items visibility">: Contains categories for home and living products.
  • <div class="beauty-section-items visibility">: Contains categories for beauty and personal care products.
  • Various <img> tags: These tags embed images in the page, used for product or promotional content.
  • <footer>: Contains footer content, including links, contact information, and additional information about the website.
  • <script src="script.js"></script>: Links to an external JavaScript file named "script.js."

This is the basic structure of our myntra clone website using HTML, and now we can move on to styling it using CSS.

<!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">
    <link rel="shortcut icon" href="" type="image/x-icon">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="icon" type="image/png"
        href="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/logo.png"/>

    <link rel="stylesheet" href="styles.css">
    <title>Online Shopping for Women, Men, Kids Fashion & Lifestyle - Myntra</title>
</head>
<body>
    <nav>
        <div class="left">
            <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/logo.png" alt="">
            <ul>
                <li class="men">Men</li>
                <li class="women">Women</li>
                <li class="kids">Kids</li>
                <li class="homeliving">Home&Living</li>
                <li class="beauty">Beauty</li>
                <li class="studio">Studio</li>
            </ul>
        </div>
        <div class="right">
            <input placeholder="Search for products, brands and more" class="desktop-searchBar" value=""
                data-reactid="904">
            <div class="icons">
                <div class="profile">Profile</div>
                <div class="wish">Wishlist</div>
                <div class="bag">Bag</div>
            </div>
        </div>
    </nav>
    <div class="men-section-items visibility"> <!--Men-->
        <div class="col-1">
            <div class="category">
                <span class="category-heading">Topwear</span>
                <div class="category-items">
                    T-shirts
                    <br>
                    Casual Shirts
                    <br>
                    Formal Shirts
                    <br>
                    Sweatshirts
                    <br>
                    Sweaters
                    <br>
                    Jackets
                    <br>
                    Blazers&Coats
                    <br>
                    Suits
                    <br>
                    Rain Jackets
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Indian&Festive Wear</span>
                <div class="category-items">
                    Kurtas & Kurta Sets
                    <br>
                    Sherwanis
                    <br>
                    Nehru Jackets
                    <br>
                    Dhotis
                    <br>
                </div>
            </div>
        </div>
        <div class="col-2">
            <div class="category">
                <span class="category-heading">Bottomwear</span>
                <div class="category-items">
                    Jeans
                    <br>
                    Casual Trousers
                    <br>
                    Formal Trousers
                    <br>
                    Shorts
                    <br>
                    Track Pants & Joggers
                    <br>
                    Jackets
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Innerwear & Sleepwear</span>
                <div class="category-items">
                    Briefs & Trunks
                    <br>
                    Boxers
                    <br>
                    Vests
                    <br>
                    Sleepwear & Loungewear
                    <br>
                    Thermals
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Plus Size</span>
            </div>
        </div>
        <div class="col-3">
            <div class="category">
                <span class="category-heading">Footwear</span>
                <div class="category-items">
                    Casual Shoes
                    <br>
                    Sports Shoes
                    <br>
                    Formal Shoes
                    <br>
                    Sneakers
                    <br>
                    Sandals & Floaters
                    <br>
                    Flip Flops
                    <br>
                    Socks
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Personal Care & Grooming</span>
            </div>
            <div class="category">
                <span class="category-heading">Sunglasses & Grooming</span>
            </div>
            <div class="category">
                <span class="category-heading">Watches</span>
            </div>
        </div>
        <div class="col-4">
            <div class="category">
                <span class="category-heading">Sports & Active Wear</span>
                <div class="category-items">
                    Sports Shoes
                    <br>
                    Sports Sandals
                    <br>
                    Active T-shirts
                    <br>
                    Track Pants & Shorts
                    <br>
                    Tracksuits
                    <br>
                    Jackets & Sweatshirts
                    <br>
                    Sports Accessories
                    <br>
                    Swimwear
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Gadgets</span>
                <div class="category-items">
                    Smart Wearables
                    <br>
                    Fitness Gadgets
                    <br>
                    Headphones
                    <br>
                    Speakers
                    <br>
                </div>
            </div>
        </div>
        <div class="col-5">
            <div class="category">
                <span class="category-heading">Fashion Accessories</span>
                <div class="category-items">
                    Wallets
                    <br>
                    Belts
                    <br>
                    Perfumes & Body Mists
                    <br>
                    Trimmers
                    <br>
                    Deodorants
                    <br>
                    Ties, Cuffinks & Pocket Squares
                    <br>
                    Accessory Gift Sets
                    <br>
                    Caps & Hats
                    <br>
                    Mufflers, Scarves & Gloves
                    <br>
                    Phone Cases
                    <br>
                    Rings & Wristwear
                    <br>
                    Helmets
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Bags & Backpacks</span>
            </div>
            <div class="category">
                <span class="category-heading">Luggages & Trolleys</span>
            </div>
        </div>

    </div>
    <div class="women-section-items visibility"> <!--women-->
        <div class="col-1">
            <div class="category">
                <span class="category-heading">Indian & Fusion Wear</span>
                <div class="category-items">
                    Kurtas&Suits
                    <br>
                    Kurtis, Tunics & Tops
                    <br>
                    Sarees
                    <br>
                    Ethnic Wear
                    <br>
                    Leggings, Salwars & Churidars
                    <br>
                    Skirts & Palazzos
                    <br>
                    Dress Materials
                    <br>
                    Lehenga Cholis
                    <br>
                    Dupattas & Shawls
                    <br>
                    Jackets
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Belts, Scarves & More</span>
            </div>
            <div class="category">
                <span class="category-heading">Watches & Wearables</span>
            </div>
        </div>
        <div class="col-2">
            <div class="category">
                <span class="category-heading">Western Wear</span>
                <div class="category-items">
                    Dresses
                    <br>
                    Tops
                    <br>
                    Tshirts
                    <br>
                    Jeans
                    <br>
                    Trousers & Capris
                    <br>
                    Shorts & Skirts
                    <br>
                    Co-ords
                    <br>
                    Playsuits
                    <br>
                    Jumpsuits
                    <br>
                    Shrugs
                    <br>
                    Sweaters & Sweatshirts
                    <br>
                    Jackets & Coats
                    <br>
                    Blazers & Waistcoats
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Plus Size</span>
            </div>
        </div>
        <div class="col-3">
            <div class="category">
                <span class="category-heading">Maternity</span>
            </div>
            <div class="category">
                <span class="category-heading">Sunglasses & Frames</span>
            </div>
            <div class="category">
                <span class="category-heading">Footwear</span>
                <div class="category-items">
                    Flats
                    <br>
                    Casual Shoes
                    <br>
                    Heels
                    <br>
                    Boots
                    <br>
                    Sports Shoes & Floaters
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Sports & Active Wear</span>
            </div>
        </div>
        <div class="col-4">
            <div class="category">
                <span class="category-heading">Lingerie & Sleepwear</span>
                <div class="category-items">
                    Bra
                    <br>
                    Briefs
                    <br>
                    Shapewear
                    <br>
                    Sleepwear & Loungewear
                    <br>
                    Swimwear
                    <br>
                    Camisoles & Thermals
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Beauty & Personal Care</span>
                <div class="category-items">
                    Makeup
                    <br>
                    Skincare
                    <br>
                    Premium Beauty
                    <br>
                    Lipsticks
                    <br>
                    Fragrances
                    <br>
                </div>
            </div>
        </div>
        <div class="col-5">
            <div class="category">
                <span class="category-heading">Gadgets</span>
                <div class="category-items">
                    Smart Wearables
                    <br>
                    Fitness Gadgets
                    <br>
                    Headphones
                    <br>
                    Speakers
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Jewellery</span>
                <div class="category-items">
                    Fashion Jewellery
                    <br>
                    Fine Jewellery
                    <br>
                    Earrings
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Backpacks</span>
            </div>
            <div class="category">
                <span class="category-heading">Handbags, Bags & Wallets</span>
            </div>
            <div class="category">
                <span class="category-heading">Luggages & Troolleys</span>
            </div>
        </div>
    </div>
    <div class="kids-section-items visibility"> <!--KIDS-->
        <div class="col-1">
            <div class="category">
                <span class="category-heading">Boys Clothing</span>
                <div class="category-items">
                    T-shirts
                    <br>
                    Shirts
                    <br>
                    Shorts
                    <br>
                    Jeans
                    <br>
                    Trousers
                    <br>
                    Clothing Sets
                    <br>
                    Ethnic Wear
                    <br>
                    Track Pants & Pyjamas
                    <br>
                    Jackets, Sweaters & Sweatshirts
                    <br>
                    Party Wear
                    <br>
                    Innerwear & Thermals
                    <br>
                    Nightwear & Loungewear
                    <br>
                    Value Packs
                    <br>
                </div>
            </div>
        </div>
        <div class="col-2">
            <div class="category">
                <span class="category-heading">Girls Clothing</span>
                <div class="category-items">
                    Dresses
                    <br>
                    Tops
                    <br>
                    Tshirts
                    <br>
                    Clothing Sets
                    <br>
                    Lehenga choli
                    <br>
                    Kurta Sets
                    <br>
                    Party Wear
                    <br>
                    Dungarees & Jumpsuits
                    <br>
                    Skirts & Shorts
                    <br>
                    Tights & Leggings
                    <br>
                    Jeans, Trousers & Capris
                    <br>
                    Jacket, Sweater & Sweatshirts
                    <br>
                    Innerwear & Thermals
                    <br>
                    Nightwear & Loungewear
                    <br>
                    Value Picks
                    <br>
                </div>
            </div>
        </div>
        <div class="col-3">
            <div class="category">
                <span class="category-heading">Footwear</span>
                <div class="category-items">
                    Casual Shoes
                    <br>
                    Flipflops
                    <br>
                    Sports Shoes
                    <br>
                    Flats
                    <br>
                    Sandals
                    <br>
                    Heels
                    <br>
                    School Shoes
                    <br>
                    Socks
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Toys</span>
                <div class="category-items">
                    Learning & Development
                    <br>
                    Activity Toys
                    <br>
                    Soft Toys
                    <br>
                    Action Figure / Play set
                    <br>
                </div>
            </div>
        </div>
        <div class="col-4">
            <div class="category">
                <span class="category-heading">Infants</span>
                <div class="category-items">
                    Bodysuits
                    <br>
                    Rombers & Sleepsuits
                    <br>
                    Clothing Sets
                    <br>
                    Tshirts & Tops
                    <br>
                    Dresses
                    <br>
                    Bottom wear
                    <br>
                    Winter Wear
                    <br>
                    Innerwear & Sleepwear
                    <br>
                    Infant care
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Home & Bath</span>
            </div>
            <div class="category">
                <span class="category-heading">Personal Care</span>
            </div>
        </div>
        <div class="col-5">
            <div class="category">
                <span class="category-heading">Kids Accessories Accessories</span>
                <div class="category-items">
                    Bags & Backbacks
                    <br>
                    Watches
                    <br>
                    Jewellery & Hair accessory
                    <br>
                    Sunglasses
                    <br>
                    Maks & Protective Gears
                    <br>
                    Caps & Hats
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Brands</span>
                <div class="category-items">
                    H&M
                    <br>
                    Max Kids
                    <br>
                    Pantaloons
                    <br>
                    United Colors Of Benetton Kids
                    <br>
                    YK
                    <br>
                    U.S Polo Assn. Kids
                    <br>
                    Mothercare
                    <br>
                    HRX
                    <br>
                </div>
            </div>
        </div>
    </div>
    <div class="home-section-items visibility"> <!-- Home & Living-->
        <div class="col-1">
            <div class="category">
                <span class="category-heading">Bed Linen & Furnishing</span>
                <div class="category-items">
                    Bed Runners
                    <br>
                    Mattress Protectors
                    <br>
                    Bedsheets
                    <br>
                    Blankets, Quilts & Dohars
                    <br>
                    Pillows & Pillow Covers
                    <br>
                    Bed Covers
                    <br>
                    Diwan Sets
                    <br>
                    Chair Pads & Covers
                    <br>
                    Sofa Covers
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Flooring</span>
                <div class="category-items">
                    Floor Runners
                    <br>
                    Carpets
                    <br>
                    Floor Mats & Dhurries
                    <br>
                    Door Mats
                    <br>
                </div>
            </div>
        </div>
        <div class="col-2">
            <div class="category">
                <span class="category-heading">Bath</span>
                <div class="category-items">
                    Bath Towels
                    <br>
                    Hand & Face Towels
                    <br>
                    Beach Towels
                    <br>
                    Towels Set
                    <br>
                    Bath Rugs
                    <br>
                    Bath Robes
                    <br>
                    Bathroom Accessories
                    <br>
                    Shower Curtains
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Lamps & Lighting</span>
                <div class="category-items">
                    Floor Lamps
                    <br>
                    Ceiling Lamps
                    <br>
                    Table Lamps
                    <br>
                    Wall Lamps
                    <br>
                    Outdoor Lamps
                    <br>
                    String Lights
                    <br>
                </div>
            </div>
        </div>
        <div class="col-3">
            <div class="category">
                <span class="category-heading">Home Decor</span>
                <div class="category-items">
                    Plants & Planters
                    <br>
                    Aromas & Candles
                    <br>
                    Clocks
                    <br>
                    Mirrors
                    <br>
                    Wall Decor
                    <br>
                    Festive Decor
                    <br>
                    Pooja Essentials
                    <br>
                    Wall Shelves
                    <br>
                    Fountains
                    <br>
                    Showpieces & Vases
                    <br>
                    Ottoman
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Cushions & Cushion Covers</span>
            </div>
            <div class="category">
                <span class="category-heading"> Curtains</span>
            </div>
        </div>
        <div class="col-4">
            <div class="category">
                <span class="category-heading">Home Gift Sets</span>
            </div>
            <div class="category">
                <span class="category-heading">Kitchen & Table</span>
                <div class="category-items">
                    Table Runners
                    <br>
                    Dinnerware & Serveware
                    <br>
                    Cups and Mugs
                    <br>
                    Bakeware & Cookware
                    <br>
                    Kitchen Storage & Tools
                    <br>
                    Bar & Drinkware
                    <br>
                    Table Covers & Furnishings
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Storage</span>
                <div class="category-items">
                    Bins
                    <br>
                    Hangs
                    <br>
                    Organisers
                    <br>
                    Hooks & Holders
                    <br>
                    Laundry Bags
                    <br>
                </div>
            </div>
        </div>
        <div class="col-5">
            <div class="category">
                <span class="category-heading">Brands</span>
                <div class="category-items">
                    H&M
                    <br>
                    Marks & Spencer
                    <br>
                    Home Center
                    <br>
                    Spaces
                    <br>
                    D'Decor
                    <br>
                    Story@Home
                    <br>
                    Pure Home & Living
                    <br>
                    Swayam
                    <br>
                    Raymond Home
                    <br>
                    Maspar
                    <br>
                    Trident
                    <br>
                    Cortina
                    <br>
                    Random
                    <br>
                    Elimentry
                    <br>
                    ROMEE
                    <br>
                    SEJ by Nisha Gupta
                    <br>
                </div>
            </div>
        </div>
    </div>
    <div class="beauty-section-items visibility"> <!--Beauty-->
        <div class="col-1">
            <div class="category">
                <span class="category-heading">Makeup</span>
                <div class="category-items">
                    Lipstick
                    <br>
                    Lip Gloss
                    <br>
                    Lip Liner
                    <br>
                    Mascara
                    <br>
                    Eyeliner
                    <br>
                    Kajal
                    <br>
                    Eyeshadow
                    <br>
                    Foundation
                    <br>
                    primer
                    <br>
                    Concealer
                    <br>
                    Compact
                    <br>
                    Nail Polish
                    <br>
                </div>
            </div>
        </div>
        <div class="col-2">
            <div class="category">
                <span class="category-heading">Skincare, Bath & Body</span>
                <div class="category-items">
                    Face Moisturiser
                    <br>
                    Cleanser
                    <br>
                    Marks & Peel
                    <br>
                    Sunscreen
                    <br>
                    Serum
                    <br>
                    Face Wash
                    <br>
                    Eye Cream
                    <br>
                    Lip Balm
                    <br>
                    Body Lotion
                    <br>
                    Body Wash
                    <br>
                    Body Scrub
                    <br>
                    Hand Cream
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Baby Care</span>
            </div>
            <div class="category">
                <span class="category-heading">Masks</span>
            </div>
        </div>
        <div class="col-3">
            <div class="category">
                <span class="category-heading">Haircare</span>
                <div class="category-items">
                    Shampoo
                    <br>
                    Coditioner
                    <br>
                    Hair Cream
                    <br>
                    Hair Oil
                    <br>
                    Hair Gel
                    <br>
                    Hair Color
                    <br>
                    Hair Serum
                    <br>
                    Hair Accessory
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Fragrances</span>
                <div class="category-items">
                    Perfume
                    <br>
                    Deodorant
                    <br>
                    Body Mist
                    <br>
                </div>
            </div>
        </div>
        <div class="col-4">
            <div class="category">
                <span class="category-heading">Appliances</span>
                <div class="category-items">
                    Hair Straightener
                    <br>
                    Hair Dryer
                    <br>
                    Epilator
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Men's Grooming</span>
                <div class="category-items">
                    Trimmers
                    <br>
                    Beard Oil
                    <br>
                    Hair Wax
                    <br>
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Beauty Gift & Makeup Set</span>
                <div class="category-items">
                    Beauty Gift
                    <br>
                    Makeup Kit
                </div>
                <hr class="horizontal-line2">
            </div>
            <div class="category">
                <span class="category-heading">Premium Beauty</span>
            </div>
            <div class="category">
                <span class="category-heading">Wellness & Hygine</span>
            </div>
        </div>
        <div class="col-5">
            <div class="category">
                <span class="category-heading">Top Brands</span>
                <div class="category-items">
                    Lakme
                    <br>
                    Maybeline
                    <br>
                    LOreal
                    <br>
                    Philips
                    <br>
                    Bath & Body Works
                    <br>
                    THE BODY SHOP
                    <br>
                    Biotique
                    <br>
                    Mamaearth
                    <br>
                    MCafeine
                    <br>
                    Nivea
                    <br>
                    Lotus Herbals
                    <br>
                    LOreal Professionnel
                    <br>
                    KAMA AYURVEDA
                    <br>
                    M A C
                    <br>
                    Forest Essentials
                </div>
            </div>
        </div>
    </div>
    <div class="studio-section-items"></div>

    <div class="container">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/ss1.png" alt="">
    </div>
    <div class="section">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic1.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic2.webp" alt="">
    </div>
    <div class="section1">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic3.webp" alt="">
    </div>
    <div class="section2">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic4.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic6.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic7.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic8.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic9.webp" alt="">
    </div>
    <div class="section3">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic5.webp" alt="">
    </div>
    <div class="section4">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic10.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic11.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic12.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic13.jpg" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic14.webp" alt="">
    </div>
    <div class="section5">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic15.webp" alt="">
    </div>
    <div class="section6">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic16.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic17.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic18.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic19.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic20.webp" alt="">
    </div>
    <div class="section7">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic21.webp" alt="">
    </div>
    <div class="section8">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic22.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic23.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic24.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic25.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic26.webp" alt="">
        <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/myntraclone/pic27.jpg" alt="">
    </div>
    <footer>
        <div class="footer-container">
            <div class="row">
                <div class="online-shopping">
                    <span class="content-heading">ONLINE SHOPPING</span>
                    <div class="content-box">
                        <br>
                        Men
                        <br>
                        Women
                        <br>
                        Kids
                        <br>
                        Home & Living
                        <br>
                        Beauty
                        <br>
                        Gift Cards
                        <br>
                        Myntra Insider
                    </div>
                    <br>
                    <span class = "content-heading">USEFUL LINKS</span>
                    <div class="content-box">
                        <br>
                        Blog
                        <br>
                        Careers
                        <br>
                        Site Map
                        <br>
                        Corporate Information
                        <br>
                        Whitehat
                    </div>

                </div>
                <div class="customer-policies">
                    <span class = "content-heading">CUSTOMER POLICIES</span>
                    <div class="content-box">
                        <br>
                        Contact Us
                        <br>
                        FAQ
                        <br>
                        T&C
                        <br>
                        Terms Of Use
                        <br>
                        Track Orders
                        <br>
                        Shipping
                        <br>
                        Cancellation
                        <br>
                        Returns
                        <br>
                        Privacy policy
                        <br>
                        Grievance Officer
                    </div>
                </div>
                <div class="app">
                    <span class="content-heading">EXPERINCE MYNTRA APP ON MOBILE</span>
                    <div class="download-button">
                        <div class="Google-play">
                            <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/google-play.png" alt="google play">
                        </div>
                        <div class="App-Store">
                            <img src="https://raw.githubusercontent.com/ZeroOctave/ZeroOctave-Javascript-Projects/main/assets/Images/app-store.png" alt="app store">
                        </div>
                    </div>
                    <br>
                    <div class="links-container">
                        <span class="content-heading">KEEP IN TOUCH</span>
                        <div class="social-links">
                            <span class="fb-icon">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-facebook" viewBox="0 0 16 16">
                                    <path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z"/>
                                </svg>
                            </span>
                            <span class="tw-icon">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-twitter" viewBox="0 0 16 16">
                                    <path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"/>
                                </svg>
                            </span>
                            <span class="yt-icon">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-youtube" viewBox="0 0 16 16">
                                    <path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z"/>
                                </svg>
                            </span>
                            <span class="ig-icon">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-instagram" viewBox="0 0 16 16">
                                    <path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"/>
                                </svg>
                            </span>
                        </div>
                    </div>
                </div>
                <div>
                    <div class="customer-satisfaction"><strong class="original"> 100% ORIGINAL</strong> guarantee <br>
                    for all products at myntra.com</div>
                    <div><strong class="original">Return within 30days </strong>of <br>
                    receiving your order</div>
                </div>
            </div>
            <div class="popular-searches">
                <Span class="content-heading">POPULAR SEARCHES</Span>
                <br>
                <p class="para-content">
                    Makeup | Dresses For Girls | T-Shirts | Sandals | Headphones | Babydolls | Blazers For Men | Handbags | Ladies Watches | Bags | Sport Shoes || Reebok Shoes | Puma Shoes | Boxers | Wallets | Tops | Earrings | Fastrack Watches | Kurtis | Nike | Smart Watches | Titan Watches | Designer Blouse | Gowns | Rings | Cricket Shoes | Forever 21 | Eye Makeup | Photo Frames | Punjabi Suits | Myntra Fashion Show | Lipstick | Saree | Watches | Dresses | Lehenga | Nike Shoes | Goggles | Suit | Chinos | Shoes | Adidas Shoes | Woodland Shoes | Jewellery | Designers Sarees
                </p>
                <div class="copyright-container">
                    <div>In case of any concern, Contact Us</div>
                    <div> © 2022 <a href="#">www.myntra.com</a> All right reserved.</div>

                </div>
            </div>
            <hr class="horizontal-line">
            <div class="office-address">
                <span class="content-heading">Registered Office Address</span>
                <div class="office-address-content">
                    <br>
                    Building Alyssa
                    <br>
                    Begonia and Clover situated in Embassy Tech Village,
                    <br>
                    Outer Ring Road,
                    <br>
                    Devarabeesanahalli Village,
                    <br>
                    Varthur Hobli,
                    <br>
                    Bengaluru-560103, India
                    </div>
            </div>
            <hr class="horizontal-line">
            <div class="online-shopping">
                <span class="other-info-heading">ONLINE SHOPPING MADE EASY AT MYNTRA</span>
                <p class="other-info-para-content">If you would like to experience the best of online shopping for men, women and kids in India, you are at the right place. Myntra is the ultimate destination for fashion and lifestyle, being host to a wide array of merchandise including clothing, footwear, accessories, jewellery, personal care products and more. It is time to redefine your style statement with our treasure-trove of trendy items. Our online store brings you the latest in designer products straight out of fashion houses. You can shop online at Myntra from the comfort of your home and get your favourites delivered right to your doorstep.</p>
            </div>

            <div class="myntra-app">
                <span class="other-info-heading">MYNTRA APP</span>
                <p class="other-info-para-content">
                    Myntra, India's no. 1 online fashion destination justifies its fashion relevance by bringing something new and chic to the table on the daily. Fashion trends seem to change at lightning speed, yet the Myntra shopping app has managed to keep up without any hiccups. In addition, Myntra has vowed to serve customers to the best of its ability by introducing its first-ever loyalty program, The Myntra Insider. Gain access to priority delivery, early sales, lucrative deals and other special perks on all your shopping with the Myntra app. Download the Myntra app on your Android or IOS device today and experience shopping like never before!
                </p>
            </div>
            <div class="history">
                <span class="other-info-heading">HISTORY OF MYNTRA</span>
                <div class="other-info-para-content">
                    <p>
                        Becoming India's no. 1 fashion destination is not an easy feat. Sincere efforts, digital enhancements and a team of dedicated personnel with an equally loyal customer base have made Myntra the online platform that it is today. The original B2B venture for personalized gifts was conceived in 2007 but transitioned into a full-fledged ecommerce giant within a span of just a few years. By 2012, Myntra had introduced 350 Indian and international brands to its platform, and this has only grown in number each passing year. Today Myntra sits on top of the online fashion game with an astounding social media following, a loyalty program dedicated to its customers, and tempting, hard-to-say-no-to deals.
                    </p>
                    <br>
                    <p>
                        The Myntra shopping app came into existence in the year 2015 to further encourage customers’ shopping sprees. Download the app on your Android or IOS device this very minute to experience fashion like never before
                    </p>
                </div>

            </div>
            <div class="shop-at-myntra">
                <span class="other-info-heading">SHOP ONLINE AT MYNTRA WITH COMPLETE CONVENIENCE</span>
                <div class="other-info-para-content">
                    <p>
                        Another reason why Myntra is the best of all online stores is the complete convenience that it offers. You can view your favourite brands with price options for different products in one place. A user-friendly interface will guide you through your selection process. Comprehensive size charts, product information and high-resolution images help you make the best buying decisions. You also have the freedom to choose your payment options, be it card or cash-on-delivery. The 30-day returns policy gives you more power as a buyer. Additionally, the try-and-buy option for select products takes customer-friendliness to the next level.
                    </p>
                    <br>
                    <p>
                        Enjoy the hassle-free experience as you shop comfortably from your home or your workplace. You can also shop for your friends, family and loved-ones and avail our gift services for special occasions.
                    </p>
                </div>
            </div>

        </div>

    </footer>
    <script src="script.js"></script>
</body>
</html>

Step 2 (CSS Code):

Once the basic HTML structure of the clone website is in place, the next step is to add styling to the website using CSS.

Next, we will create our CSS file. In this file, we will use some basic CSS rules to style our myntra clone website. Let's break down the code step by step:

1. The first block of code applies some styles to all elements (denoted by '*'). It sets the margin and padding to 0 pixels for all elements, which helps to remove any default spacing that browsers apply.

2. The 'html' element is styled to enable smooth scrolling behavior. This means that when users scroll, it will scroll smoothly instead of jumping abruptly between sections.

3. The 'body' element is styled with 'overflow-x: hidden', which prevents horizontal scrolling. This is often used to ensure that the page content fits within the viewport width.

4. The 'nav' element is styled to create a fixed navigation bar at the top of the page. It has a white background color, is positioned at the top of the viewport ('top: 0px'), and includes a box shadow for a subtle drop shadow effect. The navigation items are horizontally aligned and centered within the bar.

5. Inside the 'nav' element, there is a 'left' section containing an unordered list ('ul') for navigation links. These links are styled with padding, text transformation to uppercase, font properties, and a color scheme. The logo is also present in this section, styled with a specific width and padding.

6. There is a 'container' class applied to images within the page content. These images are styled to be responsive ('width: 98.5vw') and have their background properties set.

7. Sections of the page (e.g., 'section', 'section1', 'section2', etc.) are defined and styled with flexbox properties to center their content horizontally. The images inside these sections are also given specific widths and heights, making them responsive.

8. The 'footer' element is styled to have a light gray background color, padding, and various font properties for text. Links within the footer are styled with cursor pointers and specific colors.

9. The 'right' section within the footer is styled to include an input field and some icons. The input field has specific styles for font size, padding, and border, while the icons have various styles like color, font weight, and spacing.

10. The 'footer-container' class is applied to a container within the footer. It is given a background color and padding.

11. There are several 'row' and 'row-2' classes used to define rows of content within the footer. These rows contain various text content with specific font styles.

12. The 'copyright-container' class defines a container for copyright information and separates it from other footer content with a horizontal line.

13. The 'horizontal-line' class styles a horizontal line with a light gray color and low opacity.

14. The 'office-address-content' class defines the styling for an office address section.

15. The 'other-info-heading' and 'other-info-para-content' classes are used for additional information in the footer.

16. Social media icons (e.g., 'fb-icon', 'tw-icon', 'yt-icon') are styled with margins for spacing.

17. Several classes ('men-section-items', 'women-section-items', 'kids-section-items', 'home-section-items', 'beauty-section-items') define the styling for different sections of the website. These sections appear to be positioned absolutely and have specific dimensions, padding, and font styles.

18. Various 'col-1', 'col-2', 'col-3', 'col-4', 'col-5' classes define columns within these sections. They have margin and font styles.

19. The 'category' and 'category-items' classes style category headings and items within these sections.

20. The 'horizontal-line2' class defines horizontal lines within the sections.

21. The 'visibility' class is set to 'display: none', indicating that elements with this class are hidden.

22. The 'category-heading' class styles category headings with a specific color and font weight.

This will give our myntra clone website an upgraded presentation. Create a CSS file with the name of styles.css and paste the given codes into your CSS file. Remember that you must create a file with the .css extension.

* {
  margin: 0px;
  padding: 0px;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

nav {
  position: sticky;
  background-color: #ffffff;
  top: 0px;
  height: 62px;
  display: flex;
  align-items: center;
  padding: 5px 0px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.left {
  display: flex;
  align-items: center;
  width: 100%;
}

.left ul {
  display: flex;
  list-style: none;
  align-items: center;
}

.left ul li {
  padding: 0px 20px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .3px;
  color: #090909;
  line-height: 80px;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.left img {
  width: 53px;
  height: 36px;
  padding: 0px 50px;
}

.container img {
  cursor: pointer;
  width: 98.5vw;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 25px;
}

.section {
  display: flex;
  margin: 3px 2px;
  justify-content: center;
}

.section img {
  cursor: pointer;
  width: 48vw;
  background-size: cover;
}

.section1 img {
  cursor: pointer;
  width: 100vw;
  background-size: cover;
}

.section2 {
  display: flex;
  justify-content: center;
}

.section2 img {
  cursor: pointer;
  width: 285px;
  height: 380px;
}

.section3 img {
  cursor: pointer;
  width: 100vw;
  background-size: cover;
}

.section4 {
  display: flex;
  justify-content: center;
}

.section4 img {
  cursor: pointer;
  width: 290px;
  height: 345px;
}

.section5 img {
  cursor: pointer;
  width: 100vw;
  background-size: cover;
}

.section6 {
  display: flex;
  justify-content: center;
}

.section6 img {
  cursor: pointer;
  width: 291px;
  height: 375px;
}

.section7 img {
  cursor: pointer;
  width: 100vw;
  background-size: cover;
}

.section8 {
  display: flex;
  justify-content: center;
}

.section8 img {
  cursor: pointer;
  width: 261px;
  height: 351px;
}

footer {
  /* margin-top: 25px; */
  height: 55px;
  /* text-align: center; */
  background-color: #f7f7f7;
  padding-top: 28px;
  font-size: 14px;
  color: #696b79;
  text-decoration: none;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  letter-spacing: .3px;
}

footer a {
  cursor: pointer;
  color: #696b79;
  text-decoration: none;
  font-weight: 500;
}

.right {
  display: flex;
  align-items: center;
  width: 100%;
}

.right input {
  font-size: 14px;
  height: 20px;
  line-height: 24px;
  width: 60%;
  color: #696e79;
  padding: 8px 10px 10px;
  outline: 0;
  border: 1px solid #f5f5f6;
  border-radius: 4px 4px 4px 4px;
  background: #f5f5f6;
}

.icons {
  display: flex;
  margin: 0px 42px;
}

.profile,
.wish,
.bag {
  color: #000;
  font-size: 14px;
  font-weight: 800;
  padding: 0px 13px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.footer-container{
  display: flex;
  flex-direction: column;
  background-color: #f7f7f7;
  padding-left: 220px;
  padding-right: 220px;
}

.row{
  display: flex;
  margin-bottom: 20px;
}
.online-shopping{
  text-align: left;
  margin-right: 50px;
}
.customer-policies{
  text-align: left;
  margin-right: 50px;
}
.app{
  text-align: left;
  margin-right: 90px;
}
.row-2{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;

}
.content-heading{
  color: black;
  font-weight: 600;
  letter-spacing: normal;
}
.content-box{
  line-height: 1.6;
}
.para-content{
  margin-top: 25px;
  margin-bottom: 40px;
}
.copyright-container{
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}
.horizontal-line{
  margin-bottom: 30px;
  opacity: 0.2;
  height: 0.3px;
}
.office-address-content{
  opacity: 0.9;
  margin-bottom: 30px;
}
.other-info-heading{
  font-weight: 600;
  letter-spacing: normal;
  color: black;
  font-size: 15px;
  opacity: 0.8;

}
.other-info-para-content{
  margin-top: 8px;
  margin-bottom: 30px;
  font-size: 13px;
  opacity: 0.8;
}
.Google-play{
  background-repeat: none;
  margin-right: 10px;

}
.App-Store{
  background-repeat: none;

}
.download-button{
  display: flex;
  margin-top: 30px;
}
.download-button img{
  width: 130px;
  height:40px;
}

.original{
  margin-bottom: 30px;
  color: black;
  opacity: 0.8;

}
.customer-satisfaction{
  margin-bottom: 30px;
}
.social-links{
  margin-top: 12px;
}

.fb-icon{
  margin-right:6px;
}
.tw-icon{
  margin-right:6px;
}
.yt-icon{
  margin-right:6px;
}

.men-section-items{
  background-color: rgb(255, 255, 255);
  display: flex;
  position: absolute; /* to be removed */
  width: 1050px;
  height: 510px;
  /*top: 232px;  to be removed */
  right: 1px;
  left: 130px;
  padding-left: 45px;
  padding-right: 45px;
  padding-bottom: 15px;
  z-index: 10;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.women-section-items{
  background-color: rgb(255, 255, 255);
  display: flex;
  position: absolute; /* to be removed */
  width: 1050px;
  height: 510px;
  /*top: 232px;  to be removed */
  right: 1px;
  left: 130px;
  padding-left: 45px;
  padding-right: 45px;
  padding-bottom: 15px;
  z-index: 10;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.kids-section-items{
  background-color: rgb(255, 255, 255);
  display: flex;
  position: absolute; /* to be removed */
  width: 1050px;
  height: 510px;
  /*top: 232px;  to be removed */
  right: 1px;
  left: 130px;
  padding-left: 45px;
  padding-right: 45px;
  padding-bottom: 15px;
  z-index: 10;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.home-section-items{
  background-color: rgb(255, 255, 255);
  display: flex;
  position: absolute; /* to be removed */
  width: 1050px;
  /*top: 232px;  to be removed */
  right: 1px;
  left: 130px;
  height: 510px;
  padding-left: 45px;
  padding-right: 45px;
  padding-bottom:15px;
  z-index: 10;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.beauty-section-items{
  background-color: rgb(255, 255, 255);
  display: flex;
  position: absolute; /* to be removed */
  width: 1050px;
  height:510px;
  /*top: 232px;  to be removed */
  right: 1px;
  left: 130px;
  padding-left: 45px;
  padding-right: 45px;
  padding-bottom: 15px;
  z-index: 10;
  font-family: Whitney, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.col-1{
  margin-right: 70px;
  margin-top: 15px;
}
.col-2{
  margin-right: 70px;
  margin-top: 15px;
}
.col-3{
  margin-right: 70px;
  margin-top: 15px;
}
.col-4{
  margin-right: 70px;
  margin-top: 15px;
}
.col-5{
  margin-right: 70px;
  margin-top: 15px;
}
.category{
  margin-bottom: 11px;
}
.category-items{
  margin-top: 8px;
  line-height: 1.6;
  font-size: 14px;
  opacity: 0.95;
}
.horizontal-line2{
  margin-bottom: 18px;
  margin-top: 15px;
  background-color: white;
}
.visibility{
  display: none;
}
.category-heading{
  color: #ee6780;
  font-weight: bold;
  font-size: 14px;
}

Step 3 (JavaScript Code):

Finally, we need to create a function in JavaScript. This JavaScript code is used to control the visibility of certain sections of a web page when the user hovers their mouse over specific navigation elements (like menu items) and removes the visibility when the mouse moves away. It appears to be designed for a website with different sections (e.g., men's, women's, kids', home and living, beauty) and corresponding item lists. Here's a breakdown of the code:

1. The code begins by selecting various HTML elements using the document.querySelector() method. These elements are selected based on their class names and are stored in variables for later use. For example:

  • men_section corresponds to an HTML element with the class name 'men'.
  • men_section_items corresponds to an HTML element with the class name 'men-section-items'.
  • Similar variables are created for the other sections and their corresponding items.

2. Event listeners are added to each of the section elements (men, women, kids, home, and beauty) using the onmouseover and onmouseout event handlers. These listeners respond to mouse hover and mouseout events for each section and its respective items. For example:

  • When the mouse hovers over the men_section, the men_section_items element's 'visibility' class is removed, making it visible.
  • When the mouse moves away from the men_section, the 'visibility' class is added back to hide men_section_items.
  • Similar event listeners are set up for the other sections.

3. The 'visibility' class appears to be used to control the visibility of the corresponding item lists. When this class is removed, the associated item list becomes visible, and when it's added, the item list is hidden.

4. The code also selects the <body> element using document.getElementsByTagName("BODY"), although it doesn't appear to use it for any specific purpose in the provided code.

Create a JavaScript file with the name script.js and paste the given codes into your JavaScript file and make sure it's linked properly to your HTML document so that the scripts are executed on the page. Remember, you’ve to create a file with .js extension.

const men_section = document.querySelector('.men');
const women_section = document.querySelector('.women');
const kids_section = document.querySelector('.kids');
const home_section = document.querySelector('.homeliving');
const beauty_section = document.querySelector('.beauty');

const men_section_items = document.querySelector('.men-section-items');
const women_section_items = document.querySelector('.women-section-items');
const kids_section_items = document.querySelector('.kids-section-items');
const home_section_items = document.querySelector('.home-section-items');
const beauty_section_items = document.querySelector('.beauty-section-items');

const container_ele = document.querySelector('.container');
var bodyele = document.getElementsByTagName("BODY");

men_section.onmouseover = () => {
    men_section_items.classList.remove('visibility');
}
men_section.onmouseout = () => {
    men_section_items.classList.add('visibility');
} /* men section ends here */

women_section.onmouseover = () => {
    women_section_items.classList.remove('visibility');
}
women_section.onmouseout = () => {
    women_section_items.classList.add('visibility');
} /* women section ends here */

kids_section.onmouseover = () => {
    kids_section_items.classList.remove('visibility');
}
kids_section.onmouseout = () => {
    kids_section_items.classList.add('visibility');
} /* kids section ends here */

home_section.onmouseover = () => {
    home_section_items.classList.remove('visibility');
}
home_section.onmouseout = () => {
    home_section_items.classList.add('visibility');
} /* home and living ends here */

beauty_section.onmouseover = () => {
    beauty_section_items.classList.remove('visibility');
}
beauty_section.onmouseout = () => {
    beauty_section_items.classList.add('visibility');
}

Final Output:

Creating a Myntra Clone using HTML, CSS & JavaScript.gif

Conclusion:

Congratulations! You've reached the end of our journey into building a Myntra clone from scratch using HTML, CSS, and JavaScript. We've covered a lot of ground, from setting up your development environment to designing the user interface, adding functionality with JavaScript, and finally, testing and optimizing your creation.

As you reflect on the knowledge and skills you've acquired throughout this tutorial, remember that web development is an ever-evolving field. The Myntra clone you've built is just the beginning of your journey into the world of front-end development. You now have a solid foundation to explore more advanced concepts, such as responsive design, server-side integration, and back-end development.

But for now, take a moment to appreciate what you've accomplished. You've created a functional and visually appealing e-commerce website, similar in style to one of the fashion industry's giants. Your ability to transform code into a user-friendly interface is a valuable skill that can open doors to countless opportunities in the tech industry.

As you continue your coding journey, remember that practice makes perfect. Don't hesitate to experiment with new features, refine your design skills, and explore different web development frameworks and libraries. With dedication and continuous learning, you can reach even greater heights in the world of web development.

Thank you for joining us on this educational and creative adventure. We wish you the best of luck in all your future coding endeavors, and may your Myntra clone be just the beginning of your coding success story. Happy coding!

Code by: ZeroOctave

View Live Preview ⟶

That’s a wrap!

I hope you enjoyed this post. Now, with these examples, you can create your own amazing page.

Did you like it? Let me know in the comments below 🔥 and you can support me by buying me a coffee

And don’t forget to sign up to our email newsletter so you can get useful content like this sent right to your inbox!

Thanks!
Faraz 😊

End of the article

Subscribe to my Newsletter

Get the latest posts delivered right to your inbox


Latest Post

Please allow ads on our site🥺