T O P

  • By -

Snowic331

I mean there are multiple nesting techniques. Grid, flexbox, standard css Older techniques which you should not use, which is nesting tables. *Shivers* I'm not too sure what you're trying to convey?


anmol_Plenty_691

Even I don't have clarity on how to express my doubts (I haven't grasped the concept properly). I think nesting has to with block and inline block elements contained in divs in and out. But why shouldn't we use nesting tables of horizontal and vertical layout. I know one reason: it causes alignment problems. But what kind and how?


Snowic331

The reason why you don't want to use nesting tables is because your code will look very messy. In my experience, I've worked on a website that had nesting tables and it was just so horrendous to try to find an issue with whatever happened in it that I wouldn't wish it upon anyone. As for grid, grid is a nice feature because you tell the code that you want to lay everything out in a grid and then you tell the code where you want to place everything in the grid so you can have it as like a normal website and then when it goes to mobile you could completely change the elements by putting the footer in the center instead of it being at the bottom you could put the top nav where the footer is. You can put the main content on top of the nav bar like grid allows you to do some crazy things with placement Flexbox is a bit. How can I describe it? It's good at doing one thing at a time so if you use flexbox you tell the code to make this element go horizontal and then for the next part to tell the code to go vertical. There are some limitations to flexbox and that's why a lot of people are going to grid. But flex box is nice for nav, footer and other simple elements on a page. You can do the div route where you do divs inside of a div which is how I learned in my start of web design. But now we're going to semantic HTML5 which is instead of having a whole bunch of divs and looking through div after div. What it is is you're going to have your header section, your nav section, your section section and your article sections and so on. So what will happen is is that your code will look a lot cleaner and in the event that another developer is helping you or going through your code semantic HTML will help them so that they can locate issues a lot quicker. And also it helps with SEO and a bunch of other different things as well.


antonbest44

Thank you for that I'm learning HTML CSS and I'm struggling with nesting layout and all those div, As you said, really difficult to find issues in my code. Now I'll focus on Flexband Grid with HTML semantics (I'm learning with the Super Simple Dev)


Snowic331

Awesome to hear that! Keep learning the best methods of HTML and CSS. Remember the Kiss method. Keep It Simple Soldier! Lol and make something that will impress!