Node.js for Mobile: Flexbox and CSS Grids

Two new technologies impacting web application development are these new CSS layout methodologies. The CSS3 committee has been working on several fronts, including page layout.

In the distant past, we used nested HTML tables for page layout. That is a bad memory that we don’t have to revisit. More recently, we’ve been using a box model using <div> elements, and even at times using absolute or relative placement techniques. All these techniques have been suboptimal in several ways, some more than others.

One popular layout technique is to divide the horizontal space into columns and assign a certain number of columns to each thing on the page. With some frameworks, we can even have nested <div> elements, each with their own set of columns. Bootstrap 3, and other modern frameworks, used that layout technique.

The two new CSS layout methodologies, Flexbox ( CSS_flex-box_layout) and CSS Grids ( docs/Web/CSS/CSS_Grid_Layout), are a significant improvement over all previous methodologies. We are mentioning these technologies because they’re both worthy of attention.

With Bootstrap 4, the Bootstrap team chose to go with Flexbox. Therefore, under the hood are Flexbox CSS constructs.

Having set up Bootstrap, and having learned some background to responsive web design, let’s dive right in and start implementing responsive design in Notes.

Source: Herron David (2020), Node.js Web Development: Server-side web development made easy with Node 14 using practical examples, Packt Publishing.

Leave a Reply

Your email address will not be published. Required fields are marked *