<?xml version="1.0" encoding="utf-8"?>

Grids are a layout system that helps organize and structure content within a design. They consist of intersecting horizontal and vertical lines that create a framework for placing elements on a screen. This system provides a sense of order, hierarchy, and alignment, making it easier for users to navigate and understand the layout of a user interface. Learning the best practices for designing using grids can help you create interfaces that are both aesthetically pleasing and user-friendly.

Exercise #1

Align containers within grid borders

Align containers within grid borders Bad Practice
Align containers within grid borders Best Practice

The column grid is probably the most popular type among graphic and web designers. It splits the page into vertical bars with homogeneous margins between them. There are many other types of grid systems too, but the main principle is the same — always keep the container aligned within grid borders. This precision in alignment not only improves the aesthetic appeal but also reinforces the grid system's functionality, creating a visually harmonious design.

Also, keep the content span inside grid borders, regardless of its type. This makes sure that your content stays inside the safe area without bleeding into the margin.[1]

Exercise #2

Use similar alignment for similar elements

Use similar alignment for similar elements Bad Practice
Use similar alignment for similar elements Best Practice

Consistent alignment contributes to a polished and professional appearance, reinforcing the coherence of your design. By aligning similar elements — such as buttons, text blocks, or images — in a uniform manner, you create visual harmony and improve the overall readability of your interface. You also enhance users' understanding of the content hierarchy, streamlining their navigation experience.

Pro Tip: Stay consistent in your alignment between pages and sections.

Exercise #3

Maintain vertical rhythm

Maintain vertical rhythm Bad Practice
Maintain vertical rhythm Best Practice

When incorporating images and media elements of different sizes into your design, maintain flexibility to adapt to these variations while preserving a consistent vertical rhythm. Vertical rhythm is important because it creates a visually harmonious and organized layout, making the content easier to read and navigate.

Avoid leaving large gaps between elements by aiming for a harmonious flow that accommodates diverse content sizes. For example, in a grid-based layout with text blocks interspersed with images, don't stick rigidly to fixed vertical spacing. Instead, adjust the spacing dynamically based on the height of the media elements. If an image is taller, let the adjacent text block align snugly next to it, minimizing excessive white space. This approach ensures a visually cohesive and balanced design, enhancing the overall user experience by making the layout look more structured and intentional.

Exercise #4

Align elements on both axes

Align elements on both axes Bad Practice
Align elements on both axes Best Practice

When structuring a page with similar elements, maintain a consistent vertical alignment for each type of element. This means aligning images with images, text with text, buttons with buttons, and so on. For instance, if you have a series of images within a grid, ensure that their baseline or top edges align uniformly. The same principle applies to text blocks — align their baselines or tops to establish a clean and cohesive layout.

This method not only enhances the overall aesthetics but also aids users in quickly scanning and comprehending the content, as similar elements follow a predictable alignment pattern.

Exercise #5

Use consistent image size

Use consistent image size Bad Practice
Use consistent image size Best Practice

Images of varying dimensions used within the same context can create a sense of visual imbalance if not carefully handled. Imagine a product list page where you incorporate a mix of images — some in portrait orientation, others in landscape, and perhaps a few in square format, all of different sizes. This would look very jarring to users. To avoid this, make sure their sizes are similar. This doesn't mean every image needs to be identical but strive for a balance that prevents one image from overpowering others due to significant size differences.

Exercise #6

Align similar elements on both axes

Align similar elements on both axes Bad Practice
Align similar elements on both axes Best Practice

Similar elements should follow the same alignment rules on both axes. Keeping your alignment consistent across similar content increases legibility.

Exercise #7

Use independent width for containers

In web and app design, where diverse elements like images, buttons, and text coexist, accommodating various screen sizes is crucial. Using containers with independent width is a strategic approach to maintain consistent element dimensions regardless of screen changes.[2]

For instance, if you have a button or an image within a container, setting that container's width independently allows the button or image to retain its size on different screens. By opting for independent-width containers, you enhance the responsiveness of your design. Elements remain visually stable, avoiding distortion or awkward scaling on different devices.

Exercise #9

Place related elements in proximity

Place related elements in proximity Bad Practice
Place related elements in proximity Best Practice

Don't skimp on white space but always keep the proximity principle in mind — related elements should be near each other and aligned respectively.[3] Users perceive nearby elements as parts of one group and far-away elements as strangers to each other. 

Consider a webpage with a form that includes input fields, labels, and a submit button. By maintaining sufficient white space around each form field and aligning them closely, you visually group these related elements. Users instinctively perceive these elements as part of the same task or form, facilitating a clear understanding of their relationship.

Exercise #10

Keep the content inside columns

Keep the content inside columns Bad Practice
Keep the content inside columns Best Practice

While considering the overall grid structure is crucial, paying attention to individual columns is equally important in maintaining a tidy and organized layout. Each column in the grid serves as a designated space for specific content. So, ensure that content stays within its designated column boundaries and doesn't spill into the gutters or other columns.

For example, if you have a grid with multiple columns, and an image is meant to occupy one column, ensure that the image content is contained within that column. Avoid allowing the image to overflow into the gutter space between columns, as this can disrupt the visual hierarchy and create a cluttered appearance.

Exercise #11

Adapt your container size, not the grid

Imagine a grid as a framework that provides structure to your layout. Rather than adjusting the grid's columns and gutters to fit your content, maintain a consistent grid structure and adapt the size of your content containers to align with it. If your design involves text, images, or other elements, adjust their sizes within the designated grid spaces.

Using a fixed grid makes adding new content easier and maintains consistency and predictability with the overall design vision. It reduces the endless possibilities of layout arrangements to a manageable number.

Complete this lesson and move one step closer to your course certificate