HoangLiarPhuongLe / html_css_training

https://practice-one-smartweb.vercel.app
0 stars 0 forks source link

OPEN QUESTION: With the same style, if we can use grid to set layout for it, can we also use flexbox to set layout for it?. And if we use flexbox to set layout for it, can we also use grid to set layout for it? #48

Open HoangLiarPhuongLe opened 1 year ago

HoangLiarPhuongLe commented 1 year ago

My answer for Open Question:

With grid which allows me to create complex grids with both rows and columns, giving me precise control over the position of each element. It's very useful when I need to create areas with fixed or variable sizes. If my design doesn't require a complex grid structure or fixed sizes for columns and rows, using grid might make me HTML and CSS more complex than necessary.

With flex which allows me to focus on organizing elements in one direction. This is particularly useful when I want to create flexible rows or columns that can expand as needed, or when I only need to adjust the position of elements in one direction. If my design with
multiple rows and columns, I think flex is not suitable and it doesn't provide as detailed control as grid.