D
D
Denis2019-06-21 09:38:10
Layout
Denis, 2019-06-21 09:38:10

Table in responsive layout?

The table on the desktop is displayed normally, on the iPhone 7, for example, the table leaves the edges of the screen on one side, and as I understand it, this is due to the content in the table itself? Even, I think because of the number of columns. Can't you do something about it? To be even?
Well, an additional question. The table is formed in php, it is possible to make it in php so that there is a condition: for desktops, all columns, for mobile, one or two columns less. about the same meaning as in css with media queries?
forgot the link to the site -> here

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Akulinin, 2019-06-21
@forkhammer

There are 2 options:
1) make a horizontal scroll for the table on mobile devices
2) make the table on flex, and make it adaptive on mobile devices with media queries
The first option is simpler, but the look is not for everyone. The second is more gemorno, but allows you to achieve full adaptability for different resolutions

K
Konstantin Timosheno, 2019-06-21
@kastembay

Make td all block in media queries. When the page is compressed, all the cells will be under each other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question