What do you guys use more rows or div?

Hi guys, I wanted to know your opinion about rows and div when designing your websites, and how you use the Blocs tools. I’m sure many of us have seen videos that have taught us how to use blocs, where you insert rows inside rows, over and over but apparently, this is the wrong technique. What do you do when you design your sites? Do you use more divs or rows?

1 Like

You realise rows and columns are just Divs with classes.

I use flex a lot to build layouts inside columns. They are Divs too :grinning_face_with_smiling_eyes:

you know what I mean :wink: So you use flex to build layouts. Does your code have HTML errors when you export from blocs or does it come out clean?

Blocs exports very tidy markup.

I’m really not sure what you’re getting at.

This -----> https://validator.w3.org/nu/?doc=https%3A%2F%2Fblocsbuilder.com%2F seems silly but it will affect your SEO ranking.

Yeah, some of those are because of my bad naming of attributes. Those errors are fine… not ideal :innocent:

I will be correcting those. Tick that up to learning and making sure they are data-*

Some frameworks will do that too.

Even when you don’t add any class you get those. I think there is another thread about it from a few years ago, where people are saying to ignored it cause it is not important but talking on seo groups apparently it does. And also a few weeks ago i ask a question on stackflow and someone told me I had one row inside another and that was a bad practice so it got me thinking as I don’t use divs much.

Did you have a row inside a row or a row inside a column?

There are a lot of opinions online, no doubt some valid ones. I think some of this stuff gets taken too far though. If you check some big name sites you will find all sorts of errors, sites that companies have paid tens of thousands of dollars for.

On Thursday I have an exam to study to become a full stack web developer and school asked me to build a website using only Html and css, no bootstrap haha.

How fun with that Stewie

Thank you :slight_smile:

Nice. Then you realise how much quicker frameworks make things. But good to have the skills to understand HTML and CSS.

Haha I already ask heeee can i use bootstrap? :rofl:

Rows are actually just “wrapper divs” for columns in Bootstrap. So the number of rows you have is solely dependent on how you use COLUMNS.

What you are really trying to pinpoint I think is when to use a new bloc (a.k.a. section) versus when to use the “column brics”. If that’s your question, I think it’s a great one.

A closer look…

It really doesn’t matter in terms of HTML, as long as it’s valid markup, the browser simply doesn’t care. But since Blocs on the other hand is an interface for manipulating that HTM there are optimal ways to use the tool. But I’ll say again, the final product only requires valid HTML to be “correct”.

My way…

  1. I generally reach for a Blocs section and fill it will all the content related to that section. I let the content dictate how I divide the page.

  2. Inside those sections I add the Column Brics (remember each set of columns is automatically wrapped by a row).

  3. So if I need another row, and the content belongs to the same section, I use a column bric. NOT create another section.

  4. Of course there are times when you might have so much content that you still call one section. So the rule is made to be broken.

Another interesting way to look at it is that the sections have the ability to go edge-to-edge. They are the outer container. Therefore when your design requires the width of the content to allow edge to edge you will be reaching for a blocs/section in any case.

Just some thoughts… hope this helps.

2 Likes

Thank you so much for such a great explanation :slight_smile: