Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- ====================================================================== CSS - Place this in your <head> or in an external stylesheet. ====================================================================== --> <style> :root { --fbh-bg-color: #f4f4f4; --fbh-text-color: #333; --fbh-padding: 2rem; --fbh-max-width: 1200px; --fbh-gap: 2rem; --fbh-cta-bg: #0a0a0a; --fbh-cta-hover-bg: #333; --fbh-cta-text-color: #ffffff; } .featured-hero { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; width: 100%; background-color: var(--fbh-bg-color); color: var(--fbh-text-color); padding: var(--fbh-padding); display: flex; justify-content: center; } .featured-hero * { box-sizing: border-box; } .featured-hero-container { width: 100%; max-width: var(--fbh-max-width); display: flex; flex-direction: column; gap: var(--fbh-gap); } .featured-hero-content { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding-top: 1rem; padding-bottom: 1rem; } .featured-hero-logo { height: 40px; width: auto; max-width: 150px; margin-bottom: 1.5rem; } .featured-hero-title { margin: 0 0 1rem 0; font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.2; } .featured-hero-description { margin: 0 0 2rem 0; line-height: 1.6; font-size: 1rem; } .featured-hero-cta { display: inline-block; background-color: var(--fbh-cta-bg); color: var(--fbh-cta-text-color); border: none; padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 0.3s ease; border-radius: 5px; } .featured-hero-cta:hover { background-color: var(--fbh-cta-hover-bg); } .featured-hero-image-wrapper { display: flex; align-items: center; justify-content: center; } .featured-hero-image { width: 100%; height: auto; max-width: 500px; object-fit: cover; border-radius: 8px; } @media(min-width: 768px) { .featured-hero-container { flex-direction: row; align-items: center; } .featured-hero-content { flex: 1; padding-right: var(--fbh-gap); } .featured-hero-image-wrapper { flex: 1; justify-content: flex-end; } } </style> <!-- ====================================================================== HTML - Place this in your <body> where you want the component to appear. ====================================================================== --> <section class="featured-hero"> <div class="featured-hero-container"> <div class="featured-hero-content"> <!-- Using a placeholder logo from placehold.co --> <img src="https://placehold.co/150x40/000000/FFF?text=Terra+Gear" alt="Terra Gear brand logo" class="featured-hero-logo"> <h1 class="featured-hero-title">Adventure-Ready Essentials</h1> <p class="featured-hero-description"> We've partnered with Terra Gear to bring you a curated collection of durable, high-performance outdoor equipment. Built for the wild, designed for you. </p> <a href="#" role="button" class="featured-hero-cta">Shop Terra Gear</a> </div> <div class="featured-hero-image-wrapper"> <!-- Image by Hiki App on Unsplash. Using a direct link for demonstration. For production, host your own image. --> <img src="https://images.unsplash.com/photo-1551632811-561732d1e306?q=80&w=1170" alt="A person with a large hiking backpack looking out over a mountain range." class="featured-hero-image"> </div> </div> </section>