V
V
Viktor Tumanov2014-10-24 14:51:48
css
Viktor Tumanov, 2014-10-24 14:51:48

How to make a responsive table?

Layout without using JS adaptive table, as in the screenshots, for three screen sizes: 0-600, 601-1024, 1025-...
For the largest screens, the text in the cell should be vertically aligned, for smaller ones it is not necessary.
Using jQuery to make it so that on the middle screen the text is also vertically aligned.
Actually stuck on the second resolution:
codepen.io/Benny214/pen/xDrij
9ca85dd38e4645e48eab25a89a7fb11f.png8a32a2c165ce4fbda09dd1a858ec6ae9.pngff47c47c0f94487f8bd786e63b6b3cf3.png

Answer the question

In order to leave comments, you need to log in

7 answer(s)
V
Viktor Tumanov, 2014-10-25
@benny214

decided everything!
codepen.io/Benny214/pen/xDrij

D
Denis Ineshin, 2014-10-24
@IonDen

Don't use the table by itself. Use nested blocks. Depending on the width of the screen, prescribe one or the other display: table /table-cell and you will be happy.
www.senktec.com/2014/01/using-css-display-table-ce...

A
Alexander Sydorenko, 2014-10-24
@San40

You really need to typeset on blocks. But I'm more concerned about another question .. An example of information that is reasonable to present this way?
Last name First name Middle name Address
Last name First name
Middle name Address
Last
name First name
Middle name
Address
IMHO a table row is a logical entity. Integral and indivisible ..
And about the responsiveness of tabular data, you can read here

A
Alexander Zubarev, 2015-11-29
@zualex

Here is a repository - this is a ready-made template for adaptive layout.
In the example, you can see the adaptive table.

S
Sergey Yakovlev, 2016-02-24
@Serginhio

I understand that necroposting, but maybe someone will need codepen.io/dudleystorey/pen/Geprd
or without Java - codepen.io/pixelchar/pen/rfuqK

D
Dmitry Gormash, 2014-10-25
@kanonir1886

I am using bootstrap. here and adaptability and simplicity

I
Ilya Morunov, 2016-04-07
@Chrissik

frontender.info/simple-responsive-table
https://habrahabr.ru/post/149742/
there are examples of implementing an adaptive table.
I liked the way from Chris Coyier, but there is one drawback here, if there are merged cells, then the table is not built correctly.
I also used the option with scrollbars, but there is also a minus here, users do not see the scroll

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question