Flexbox layout
How do I make an flexbox layout?
A basic responsive layout created with flexbox. If the viewport get's wider/smaller the order en widths of the elements inside changes.. What is a flexbox layout? How do you make a flexbox layout? This script and codes were developed by Sander on 18 December 2022, Sunday.
Flexbox layout - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flexbox layout</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='css/jbxqev.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-wrapper"> <h1>Flexbox layout</h1> <p>A basic responsive layout created with flexbox. If the viewport resizes the order en widths of different elements change. Go ahead and resize the screen.</p> <div class="layout-container"> <div class="flex-wrapper-container"> <div class="header"> Header </div> <div class="left-side"> Left </div> <div class="main"> main </div> <div class="right-side"> Right </div> <div class="footer"> Footer </div> </div> </div>
</div>
</body>
</html>
Flexbox layout - Script Codes CSS Codes
.container-wrapper { margin: $defaultSpacing auto; text-align: center;
}
.layout-container { padding: $defaultSpacing; background-color: #fff;
}
.flex-wrapper-container { display: flex; flex-flow: row wrap;
} .header, .left-side, .main, .right-side, .footer { flex: 100%; padding: $defaultSpacing; font-weight: 500; text-align: center; text-transform: uppercase; color: rgba(0, 0, 0, .25); } .header { color: rgba(255, 255, 255, .25); background-color: $primaryColor; } .left-side, .right-side { flex: 1 auto; min-height: 200px; background-color: $lightColor; } .main { flex: 2 auto; min-height: 200px; } .footer { color: rgba(255, 255, 255, .25); background: $darkColor; }
@media all and (max-width: 800px) { .header, .main, .footer { flex: 1 100%; } .left-side, .right-side { flex: 1 50%; } .header { order: 1; } .main { order: 2; } .left-side { order: 3; } .right-side { order: 4; } .footer { order: 5; }
}
@media all and (max-width: 560px) { .header, .main, .left-side, .right-side, .footer { flex: 1 100%; }
}
Developer | Sander |
Username | skeurentjes |
Uploaded | December 18, 2022 |
Rating | 3 |
Size | 3,615 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Side navigation | 3,043 Kb |
Card flip | 2,976 Kb |
Default template | 2,877 Kb |
Search field | 2,280 Kb |
Spinning loader | 2,038 Kb |
Image clip path mask | 3,911 Kb |
Sticky widget | 3,762 Kb |
Accordion | 4,280 Kb |
Flexbox table | 4,118 Kb |
Text 3d effct | 1,762 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Drill-down Map | Good886 | 8,484 Kb |
CSS3 Form Page Design | Rssatnam | 3,613 Kb |
P1 | Vivi_Lai | 1,533 Kb |
Arrow Navigation | Hinducows | 1,973 Kb |
React TODO | Enieste | 3,320 Kb |
Resume | Rottingroom | 5,483 Kb |
Sample Profile Screen | OurDailyBread | 5,375 Kb |
12 DAYS OF XMAS | Proto78 | 2,313 Kb |
Shopping cart | Andiio | 6,581 Kb |
Simple checkbox style | Vncnz | 2,628 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!