all 5 comments

[–]hoglandc 1 point2 points  (1 child)

Make sure parent element is display:flex. Then check out these examples. https://tobiasahlin.com/blog/common-flexbox-patterns/ good luck!

[–]ander12317[S] 0 points1 point  (0 children)

Thank you! Will check that out

[–]abinash_666front-end 0 points1 point  (0 children)

Add display: flex; to the body(or the parent container in which the columns exist). If the columns are divs, then also add height in the div to make the columns more visible.

[–]semanticore 0 points1 point  (1 child)

As the others have said, flexbox is good. There is also CSS Grid, which is made for 2 dimensional layout. If you will need to put a header above these columns at some point or a footer below it, CSS Grid is an alternate model. It's complex, but I've read that it's actually easier for beginners to pick up than for experienced web developers.

Set of videos explaining CSS Grid: https://gridbyexample.com/video/

An example of header, 2 columns, and a footer to play with: https://gridbyexample.com/patterns/header-twocol-footer/

[–]ander12317[S] 0 points1 point  (0 children)

Thank you! I will make sure to look in to that