Say goodby to Float. Float save us until today. But float was never the right solution. With Flexbox and Grid Layout, we have the right solutions (maybe) to structure layouts to many devices and screens, with less work, easy (not so much) to understand syntax and maintainable code.
Lets talk today about Flexbox and Grid Layout and how they work.
Float affect other elements
Forcing you to use other properties and techniques to solve
some problems: clearﬁx, overﬂow, faux columns, double
margins (old ie) etc etc etc…
Float depends of HTML
You need to put the HTML elements in right place and
order to make this right.
How to solve the problem
of structuring layouts?
Three solutions to different
• Grid Layout to structure parent elements.
• Flexbox to control the struture of childs.
• Template Layout to control the ﬂow of content.
At the moment, it deﬁnes a typographic grid for
CSS. It has features to set up a grid-based
template, to style the slots of the template and to
ﬂow content into them.
Today, let’s talk about
Grid Layout and Flexbox
This CSS module deﬁnes a two-dimensional grid-
based layout system, optimised for user interface
design. In the grid layout model, the children of a
grid container can be positioned into arbitrary
slots in a ﬂexible or ﬁxed predeﬁned layout grid.
Deﬁne how much the item will take of available space. The
value serves as a proportion. If all elements have 1 of value,
all elements will have same width. If one element have 2 of
value, that element will have the double of size.