1D0-720 · Question #99
In CSS, what is a best practice for creating layouts for mobile devices?
The correct answer is B. Employing a fluid layout. Fluid layouts use percentage-based widths and relative units that adapt to any screen size, making them ideal for mobile devices where screen dimensions vary widely across phones and tablets. Fixed-width layouts (A) break on smaller screens because they don't adapt to the…
Question
In CSS, what is a best practice for creating layouts for mobile devices?
Options
- AUsing fixed-width layouts.
- BEmploying a fluid layout.
- CAvoiding media queries.
- DUsing only pixel units for sizing.
How the community answered
(36 responses)- A3% (1)
- B94% (34)
- C3% (1)
Explanation
Fluid layouts use percentage-based widths and relative units that adapt to any screen size, making them ideal for mobile devices where screen dimensions vary widely across phones and tablets. Fixed-width layouts (A) break on smaller screens because they don't adapt to the viewport, often causing horizontal scrolling. Media queries (C) are actually essential for responsive design - avoiding them would make it nearly impossible to adjust styles at different breakpoints. Pixel units (D) are absolute and don't scale with the user's screen or font settings, leading to poor readability on small displays. Memory tip: Think "fluid = flexible" - just like water fills any container, a fluid layout fills any screen.
Topics
Community Discussion
No community discussion yet for this question.