Flex layout

Developer
Size
2,253 Kb
Views
14,168

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 Previews

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%; }
}
Flex layout - Script Codes
Flex layout - Script Codes
Home Page Home
Developer Olivier C
Username olivier-c
Uploaded November 19, 2022
Rating 3
Size 2,253 Kb
Views 14,168
Do you need developer help for Flex layout?

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!

Olivier C (olivier-c) Script Codes
Create amazing sales emails with AI!

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!