- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- QuizzesNew
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
HTML & CSS Flexbox Quiz
This CSS quiz tests how flexbox really distributes space. You will compute item widths from flex-grow, flex-shrink and flex-basis, choose the right alignment property for each axis, and fix the classic overflow caused by min-width: auto.
Sample question
Question 1 of 10The three children are plain <div>s. How are they laid out?
<style>
.row { display: flex; }
</style>
<div class="row">
<div>A</div>
<div>Bbbbbb</div>
<div>C</div>
</div>
Show the answer
B. Side by side, each as wide as its content, starting at the left, and all as tall as the row The defaults are flex-direction: row, justify-content: flex-start, flex: 0 1 auto (no growing) and align-items: stretch. So items sit in a row at their content width and stretch to the row's height.
What this quiz covers
- Flex container defaults and the main and cross axis
- Growing and shrinking with
flex-grow,flex-shrinkandflex-basis - What
flex: 1andflex: automean justify-content,align-itemsand auto margins- Wrapping,
orderand themin-width: autotrap
Questions people ask
Do I need an account?
No. Anyone can play. Sign in to keep your XP, streak, badges and history.
Can I retake it?
Yes. Your best score is kept, and the questions and answers are shuffled each time.