Happy 80th Independence Day 🇮🇳

Shop Collection Side By Side

Shop Collection Side By Side

Tags: Liquid Codes, collection optimizations · 11 Aug 2026

Page: Homepage

Snippet Code

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Responsive Grid Banners</title>
  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    /* body {
      font-family: Arial, sans-serif;
      line-height: 1.6;
      background-color: #f4f4f4;
      color: #333;
    } */

    .container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
      gap: 20px;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .banner {
      position: relative;
      overflow: hidden;
      border-radius: 12px;
      transition: transform 0.3s;
      background: #fff;
    }

    .banner:hover {
      transform: scale(1.05);
    }

    .banner img {
      width: 100%;
      height: auto;
      display: block;
      transition: transform 0.3s;
    }

    .banner:hover img {
      transform: scale(1.0);
    }

    .content {
      position: absolute;
      top: 10%;
      left: 10%;
      color: white;
    }

    .content h2 {
      font-size: 2rem;
      margin-bottom: 10px;
      color: black;
    }

    .content p {
      font-size: 1.1rem;
      margin-bottom: 15px;
      color: black;
    }

    .btn {
      display: inline-block;
      padding: 10px 20px;
      background: #ffffff;
      color: #1e2d7d;
      text-decoration: none;
      font-weight: bold;
      border-radius: 4px;
      transition: background 0.3s;
    }

    .btn:hover {
      background: #1e2d7d;
      color: #ffffff;
    }

    @media (max-width: 1024px) {
      .container {
        grid-template-columns: 1fr;
      }

      .content {
        top: 15%;
        left: 5%;
      }

      .content h2 {
        font-size: 1.5rem;
      }

      .content p {
        font-size: 1rem;
      }

      .btn {
        padding: 8px 15px;
      }
    }
  </style>
</head>
<body>

<div class="container">
  <div class="banner">
    <img src="https://pengessentials.com/cdn/shop/files/Garden-outdoors-image_5_1.png?v=1655821719" alt="Garden & Outdoors">
    <div class="content">
      <h2>Garden & Outdoors</h2>
      <p>Everything you need for outdoor cooking</p>
      <a href="/collections/garden-and-outdoor" class="btn">Shop Now</a>
    </div>
  </div>

  <div class="banner">
    <img src="https://pengessentials.com/cdn/shop/files/Garden-outdoors-image_5_1.png?v=1655821719" alt="Sales & Deals">
    <div class="content">
      <h2>Sales & Deals</h2>
      <p>Get all combo deals here</p>
      <a href="/collections/combos" class="btn">Shop Now</a>
    </div>
  </div>
</div>

</body>
</html>

Instructions

Heyy Guys 👋
Watch the video below to learn how to Import these Codes into your Shopify Ecommerce Store!

Complete Video Tutorial: