The Advanced CSS Collection by Craig Buckler

The Advanced CSS Collection by Craig Buckler

Author:Craig Buckler [Various]
Language: eng
Format: epub
Publisher: SitePoint
Published: 2017-08-08T23:00:00+00:00


Live Code

See the Pen Multi-Column Layout With Floats.

Conclusion

In this article we have seen CSS Grid in action and utilized it to redesign an existing float-based layout. Comparing these two solutions, we can see that the HTML and CSS code of the "grid" solution is smaller (not counting the fallbacks, of course), simpler and more expressive. With the help of the grid-template-areas property it is easy to understand how individual areas are laid out, and we may quickly reposition them or adjust their sizes. On top of that, we don't need to rely on various hacky tricks (like clearfix, for instance).

So, as you see, CSS Grid is a great alternative to floats, and it is production-ready. You may need to provide some fallback rules for Internet Explorer (that implements an older version of the specification), but as you see they are not very complex and in general the site is still usable even without any backwards compatibility at all.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.