D
D
dev4002016-07-26 16:43:05
css
dev400, 2016-07-26 16:43:05

How to make a table like this?

From a regular monitor, the table is displayed as is, 6 cells. And when viewed from mobile ( media (max-width: 599px) )
It should be displayed 3 cells in a row.
example
From a regular monitor
81316aef3936442c838b580b6c33d4d5.png
From small screens
33c9b6f2b51d41e3915e80b9dab63569.png
Please tell me how to make it up?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Андрей Федоров, 2016-07-26
@aliencash

Допустим
codepen.io/aliencash/pen/oLygJE

V
Vladislav Polyakov, 2016-07-26
@polRk

Read here
There is an item Responsive Makes the table adaptive for different screen sizes.

S
Smeecy Smeecy, 2016-07-26
@Wekeed

codepen.io/smeecy/pen/wWXBRb , you can do it this way.

M
Maxim Timofeev, 2016-07-26
@webinar

There are css grids for things like this. The most popular is part of the css framework bootstrap.
I advise you to connect it, you can not all, but only grid, then the task will be solved like this:

<div class="col-xs-4 col-md-2"></div>
<div class="col-xs-4 col-md-2"></div>
<div class="col-xs-4 col-md-2"></div>
<div class="col-xs-4 col-md-2"></div>
<div class="col-xs-4 col-md-2"></div>
<div class="col-xs-4 col-md-2"></div>

On small screens, the blocks will be 4/12 of the parent's width (3 in a row), on medium and larger screens they will be 2/12 (6 in a
row )
. In any case, I advise you to look at how it is implemented in getbootstrap.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question