Width, Height, Box Sizing, Overflow and Visibility
What does max-width: 100% commonly help prevent? (A) Content exceeding its containing width (B) All images loading (C) Fonts inheriting (D) Grid creation. Answer: A. It constrains width to the available reference size.
What does overflow: auto do? (A) Enables scrolling when necessary (B) Always hides content (C) Deletes children (D) Removes borders. Answer: A. Scrolling is available when content overflows.
Which value clips overflow without creating a scroll container? (A) clip (B) visible (C) auto (D) inherit only. Answer: A. overflow: clip clips content without scroll-container behavior.
What happens with display: none? (A) The element's box is removed from layout (B) The element remains fully visible (C) Only text changes color (D) It becomes fixed. Answer: A. It generates no layout box.
What happens with visibility: hidden? (A) Layout space is preserved (B) The element is deleted (C) Width becomes zero always (D) All siblings disappear. Answer: A. The element remains in layout but is not visible.
Does opacity: 0 automatically disable pointer interaction? (A) Yes (B) No (C) Only in Grid (D) Only in Firefox. Answer: B. Transparency alone does not disable interaction.
What does aspect-ratio: 16 / 9 express? (A) Preferred width-to-height ratio (B) Sixteen columns always (C) Nine pixels of padding (D) Font weight. Answer: A. It establishes a preferred box ratio.
What does object-fit: cover do? (A) Fills the box while preserving aspect ratio, potentially cropping (B) Stretches every image without limits (C) Hides the box (D) Adds padding. Answer: A. Cover fills the box and may crop content.
Which function sets minimum, preferred and maximum values? (A) clamp() (B) rgb() (C) url() (D) attr() only. Answer: A. Clamp constrains a preferred value between bounds.
What can happen with percentage height and an indefinite containing-block height? (A) The percentage may behave as auto (B) It always equals 1000px (C) The element is deleted (D) It becomes a font size. Answer: A. Percentage height needs an appropriate reference size.
Key Takeaways
Use min/max constraints for flexible sizing.
Choose overflow behavior based on the intended interaction.
Display, visibility and opacity have different layout and interaction effects.
Rate this course
No ratings yet — yours can be the first.
Stars show on this course. Your written note stays private.