Guest User

CSS Styling for Card Badges

a guest
Sep 26th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | Source Code | 0 0
  1.  
  2. .product-badges {
  3. position: absolute;
  4. top: 10px;
  5. right: 10px; /* This moves badges to the right side */
  6. display: flex;
  7. gap: 8px; /* Space between badges */
  8. }
  9.  
  10. .badge-product {
  11. background-color: rgb(255, 221, 153); /* This is for color for badges */
  12. border-radius: 4px;
  13. padding: 0.25rem 0.5rem;
  14. font-size: 8px;
  15. font-weight: 600;
  16. text-align: center;
  17. padding-top: 5px;
  18. color: white;
  19. background-image: linear-gradient(rgb(133, 102, 244), rgb(133, 102, 244)); /* Example gradient */
  20. text-transform: uppercase;
  21. }
  22.  
  23. .badge-product.best-seller {
  24. background-color: rgb(255, 153, 0);
  25. background-image: linear-gradient(#000, #ff2c2c); /* Choose the colors you prefer */
  26. }
  27.  
  28. .badge-product.back-in-stock {
  29. background-color: rgb(102, 255, 153);
  30. background-image: linear-gradient(#000, #ff2c2c)
  31. }
  32.  
  33. .badge-product.new-in {
  34. background-color: rgb(102, 153, 255);
  35. background-image: linear-gradient(#000, #ff2c2c);
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment