GridLesson 316Free preview
Zig Zag Layout
This lesson is part of How To · All levels
Summary
Zigzag layout arranges the lines of content alternately: the image on the left and then the text on the right, then the text on the left and the image on the right. This pattern provides visual rhythm and prevents pages from feeling monotonous. Use a flexbox with row-reverse or a CSS Grid with area sequence to make the variation.
Key points
- Each zigzag line is composed of images and text that are adjacent to each other
- The line can be reversed in a flex-direction: row-reverse
- CSS Grid can also use alternating grid-template-area
- On a small screen, stack images and text into one column
- The DOM sequence must remain logical even if the view is reversed
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.