Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>Example</title> <style> .outer-container { font: 16px sans-serif; background: gold; color: white; height: 200px; border: 1px solid black; display: flex; } .box { padding: 10px; flex: 1 1 200px; } .smaller { background: yellowgreen; flex-shrink: 5; } </style> <div class="outer-container"> <div class="box">Box 1</div> <div class="box smaller">Box 2 (smaller)</div> <div class="box">Box 3</div> </div>
Preview