Determine Bootstrap column width when detecting overflow in div

Asked

Viewed 60 times

1

Currently the distribution of Boostrap columns is fixed in size 2, example: col-lg-2, but inside that column is a <ul> with several <li>, and when overflow occurs to <ul> is displayed in two columns.

It turns out that when the list is small and the <ul> is displayed in only one column is left space and is misaligned.

I would like to specify the size of the columns dynamically so that everything is aligned correctly.

To <ul> is also generated dynamically using PHP and the overflow occurs so I did what is accepted as a response in this question that I made myself a few days ago.

inserir a descrição da imagem aqui

I want the spaces that are marked in black removed when there is no overflow. An example of overflow is in the categories Girl and Baby, when overflow occurs it breaks into two columns.

The size of the columns is fixed at 2, I would like to generate them dynamically or change by css when there is overflow.

  • Leo puts his code there in the question. put so that we can test and see the error that gives when it has few LI, if possible add a printe of how it is and how you would like it to stay.

  • I will take a print and show how the screen is currently...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.