CSSKit

CSS Ribbon Generator | Badge & Ribbon Builder - CSSKit

Free CSS ribbon generator. Create ribbon banners and corner badges with customizable colors, positions, and styles. Copy pure CSS ribbon code.

14px
150px
NEW
Sample Card
Preview of your ribbon style
.ribbon-container {
  position: relative;
  overflow: hidden;
}

.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  padding: 6px 0;
  background-color: #e53e3e;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(45deg) translate(29%, -0px);
  transform-origin: top right;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
<div class="ribbon-container">
  <div class="ribbon">NEW</div>
  <!-- Your card content here -->
</div>

What is CSS Ribbon Generator?

CSS Ribbon Generator creates decorative ribbon and badge elements using pure CSS. Build corner ribbons, top banners, and side ribbons for product labels, sale badges, "new" tags, and other promotional overlays.

How to Use CSS Ribbon Generator

Select a ribbon style (corner ribbon, top banner, or side ribbon). Choose the position (top-left, top-right, bottom-left, bottom-right). Customize the ribbon color, text color, and font size. Edit the ribbon text. Preview the ribbon on a sample card and copy the CSS code.

How CSS Ribbon Generator Works

The tool generates CSS ribbons using absolute positioning, transforms (rotate), and pseudo-elements. Corner ribbons use rotation and overflow hidden on the parent container. The tool generates both the container CSS and the ribbon CSS, including the fold effect using border tricks.

Common Use Cases

  • Adding "Sale" or "New" badges to product cards
  • Creating featured or recommended labels
  • Building promotional ribbon banners
  • Designing status indicators on cards
  • Adding corner labels to pricing plans

Frequently Asked Questions

What ribbon styles are available?

You can create corner ribbons (diagonal), top/bottom banner ribbons (horizontal), and side ribbons (vertical). Each can be positioned at different corners.

Do CSS ribbons use images?

No, the ribbons are created with pure CSS using transforms, pseudo-elements, and borders. No images are needed, making them lightweight and scalable.

Can I change the ribbon position?

Yes, you can position the ribbon at any corner (top-left, top-right, bottom-left, bottom-right) with a single selection.

How do I add a ribbon to my existing card?

Add position: relative to your card container, then add the ribbon HTML inside it. The generated CSS uses position: absolute to place the ribbon correctly.

Related Tools