How to Display Woocommerce products in Table Format?

Which one do you prefer: display: table/table-cell vs floats for two column layout?

  • Flex box aside, which one do you prefer for creating a two-column fixed-and-fluid layout: display: table/table-cell or float-based techniques? Using table/table-cell makes it easy to make both columns have the same height, but yet looks like they are not as popular as other techniques.

  • Answer:

    I would advise against using floats for layout. Now I know that they have been used in this manner for a long time, and it has become standard practice, but it's just not what floats were meant for. Evidence of this is the need for a clearfix hack. I often use display: inline-block; for layout, but if you are after two equal height columns, then display: table-cell; is the way to go. is advising against this, but I must respectfully disagree. While you wouldn't use a table for layout (instead using it for tabular data), there is nothing wrong with using the CSS display property to change an elements behaviour. After all, that's what the property is there for. The table-cell value has great browser support (http://caniuse.com/#search=table), and can be incredibly convenient in many situations.

Joshua Hibbert at Quora Visit the source

Was this solution helpful to you?

Other answers

I have always and for the foreseeable future will continue to use floats. I have never had troubles with them and they have worked perfectly so far.   I really do detest the idea of getting rid of <table> based layouts and then bringing them back through CSS. With display:table I essentially get the same result, except with less compatability, as I do with floats.

Thomas Foster

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.