search

Home  >  Q&A  >  body text

How to make a ribbon pattern on the side of a card block

<p>Based on the screenshot below, I need help adding a block with a "Complete" status. </p> <p>Click to view sample screenshot</p> <p>Currently just a div with the following configuration. </p> <pre class="brush:php;toolbar:false;"><div style="display:flex; flex-direction:column; align-items: center; justify-content: center; "> <img src="./PCIBT - Pacific Coast Institute of Business &amp; Technology_files/marketing_essentials.jpg "><a href="# ">Marketing Essentials</a> <img src="./PCIBT - Pacific Coast Institute of Business &amp; Technology_files/human_resource_tile_pic.jpg "><a href="# ">Human Resource Management</a> <img src="./PCIBT - Pacific Coast Institute of Business &amp; Technology_files/pm_fundamentals.jpg "><a href="# ">Project Management Fundamentals</a> </div></pre> <p><br /></p>
P粉381463780P粉381463780591 days ago446

reply all(1)I'll reply

  • P粉523335026

    P粉5233350262023-08-14 13:09:51

    Not perfect, but this is how it is done on the card, position: absoluteon the bow which allows you to position the bow in the desired position on the card.

      .card {
        display: flex;
        align-items: center;
        position: relative;
        width: 300px;
        height: 150px;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 20px;
        background-color: #fff;
      }
      
      .ribbon {
        position: absolute;
        top: 10px;
        left: 0px;
        background-color: #e74c3c;
        color: #fff;
        padding: 5px 15px;
      }
    <div class="card">
        <div class="ribbon">Side Offer</div>
        <h3>Card Content</h3>
        <p>This is some content inside the card.</p>
      </div>

    reply
    0
  • Cancelreply