<div class="magazine-grid">
<div class="item feature">
<span class="tag">Featured</span>
<h2>The Future of Web Design</h2>
</div>
<div class="item side-1">
<h3>Top Trends 2026</h3>
</div>
<div class="item side-2">
<h3>CSS Grid Tips</h3>
</div>
<div class="item footer-news">
<p>More news: New CSS features released today...</p>
</div>
</div>* { box-sizing: border-box; }
body {
font-family: system-ui, "Segoe UI", serif;
background: #f4f4f4;
padding: 40px;
}
.magazine-grid {
display: grid;
gap: 15px;
max-width: 900px;
margin: 0 auto;
grid-template-columns: 1fr;
/* Mobile First: Stacked */
}
.item {
background: white;
padding: 20px;
border: 1px solid #ddd;
}
.feature {
background: #111;
color: white;
min-height: 250px;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.tag {
background: #ef4444;
color: white;
padding: 4px 8px;
text-transform: uppercase;
font-size: 0.75rem;
align-self: flex-start;
margin-bottom: 10px;
font-family: sans-serif;
}
h2 { margin: 0; font-size: 2rem; line-height: 1.1; }
h3 { margin: 0; font-size: 1.2rem; }
@media (min-width: 768px) {
.magazine-grid {
grid-template-columns: 2fr 1fr;
grid-template-rows: 150px 150px auto;
grid-template-areas:
"main side1"
"main side2"
"foot foot";
}
.feature { grid-area: main; }
.side-1 { grid-area: side1; }
.side-2 { grid-area: side2; }
.footer-news { grid-area: foot; background: #e5e5e5; font-family: sans-serif; }
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.