Flex layout
How do I make an flex layout?
What is a flex layout? How do you make a flex layout? This script and codes were developed by Olivier C on 19 November 2022, Saturday.
Flex layout - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flex layout</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<html> <body> <div class="wrapper"> <main class="main">.main</main> <aside class="aside">.aside</aside> </div> <nav class="nav">.nav</nav> <footer class="footer">.footer</footer> </body>
</html>
</body>
</html>
Flex layout - Script Codes CSS Codes
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; line-height: 100%; text-align: center; font-family: sans-serif; font-size: 1.5rem; color: #333;
}
.nav { order: -1; padding: 1rem; background: Peru;
}
.footer { padding: 1rem; background: Chocolate;
}
.wrapper { display: flex; flex-direction: column; flex: 1 0 auto;
}
.main { padding: 1rem; background: Tan;
}
.aside { padding: 1rem; text-align: center; background: Orange;
}
@media (max-width: 30rem) { .main { flex: 1 0 auto; }
}
@media (min-width: 30rem) { .nav { display: block; } .wrapper { flex-direction: row; } .main { flex: 1 1 auto; } .aside { width: 20%; }
}
Developer | Olivier C |
Username | olivier-c |
Uploaded | November 19, 2022 |
Rating | 3 |
Size | 2,253 Kb |
Views | 14,168 |
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 |
Mosaic | 6,825 Kb |
Mosaic cubes | 4,488 Kb |
Picture tag, srcset and sizes attributes | 2,894 Kb |
Space Invaders | 54,137 Kb |
A Pen by Olivier C | 1,980 Kb |
Vertical Organizational Chart | 3,634 Kb |
Backgrounds... | 2,873 Kb |
Some problems caused by flexbox | 2,306 Kb |
Table layout | 2,198 Kb |
Number Lists | 2,486 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 |
Bubble animation | Ftabor | 6,565 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Vue.js Starter | Andymerskin | 1,268 Kb |
A vuejs widget | Chrgl86 | 2,869 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
404 Error Page | WebSonick | 3,203 Kb |
Javascript Welcome | Peterlewicki | 1,573 Kb |
Day 11 - Calendar Card | Arnellebalane | 6,984 Kb |
Weather App | OmranAbazid | 2,596 Kb |
Single element checkbox | Ivijaygupta | 1,996 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!