Register to get access to free programming courses with interactive exercises

Introduction CSS: Layout on the Grid

Now you're acquainted with positioning and Flex. You might have noticed that with all the variety of tools available, it's not as easy to use these tools to create layouts directly as you'd like. By adding so many techniques, Flex has missed the most important feature — you cannot create a grid for a site quickly.

When you want to create a good structure, you do additional nesting because Flex is essentially a one-dimensional system. We can easily manage something on either the x-axis or the y-axis. It helps to work with content but not with a page structure.

Flex's creators intended to change layout standards, ridding developers of awkward positioning and endless suffering from Float. Even though it does that perfectly, there's still one main problem, what do you do with complex patterns? The number of Flex containers grew in proportion to the number of non-standard elements.

However, managing all this got much more difficult. Without a structured web page grid all described in one place, everything is unbelievably fragile. It's liable to break faster than you can blink.

CSS Grid Layout or just *often abbreviated to _Grid is another powerful tool to solve this problem. Unlike Flex, CSS Grid Layout is a two-dimensional layout system for content on the page.

It is important to note that Grid doesn't replace Flex. These are two different modules that work perfectly together.

Practice

Many of the lessons in this course will include a practice section with a web view. Don't stop at the bare minimum in practice. When you finish an assignment, have a go and experiment a little with the code and the features you've learned.

During the course, you'll come across independent assignments. Also, there are code samples for you to study or to look for clues.

CodePen

Another opportunity to apply the skills you learn in the course is to use CodePen. You can create your own pen, and use it to experiment with positioning.

In each lesson of the course, there'll be examples from CodePen. They're available for review, and you can make edits in real-time and monitor the result. Don't miss out on this opportunity.


Are there any more questions? Ask them in the Discussion section.

The Hexlet support team or other students will answer you.

About Hexlet learning process

For full access to the course you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.bookmate">Bookmate</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.healthsamurai">Healthsamurai</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.dualboot">Dualboot</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.abbyy">Abbyy</span>
Suggested learning programs
profession
Layout with the latest CSS standards
5 months
from scratch
under development
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.