I do not understand why the elements of the table are displayed differently, namely, then 4 elements per line, then 1 each. http://vashe-rukodelie.ru/catalog/sets-for-embroidery/km-2/make-your-own-hands/

If you assign a display: table; then everything is displayed normally, but in 3 columns. I am trying to ensure that the partitioning into columns is automatic, depending on the monitor.

  • Elena: The problem is that my Html is written like this: <div class = "content"> <? Php Core_Page :: instance () -> execute (); ?> </ div> Ie the table is displayed by itself, I can configure it only through css. - Anton1982
  • Sadness I do not understand anything in php. Horrors tell about him, but I don’t believe it: there must be an opportunity in him to correct the template of the plug-in unit. But even if all the horror stories are all true, you can still handle it with css tools: create a pseudo-element for each nth element, clearing the stream, and remove the element wrapper from the stream itself. Design the same assign nested block. Nesting you have with the stock. - Elena Levina
  • If not difficult, then tell me how to do it. Here is a piece of css that is responsible for displaying products in the table: .shop_table {display: block; margin-bottom: 30px; width: 100%; } .shop_table .shop_item {display: table-cell; float: left; margin: 20px 5px; text-align: center; vertical-align: top; width: 220px; } .shop_table_item {display: table; height: 100%; width: 100%; } - Anton1982
  • It will not be difficult if there is a working sample on jsfiddle. I promise. - Elena Levina

1 answer 1

for this it is not necessary to present the elements as tabular. See how this is decided when using the bootstrap: for each range of permissions its own width of elements, and between them clearfix blocks, visible only with their permissions. You can do the same.