F
F
files322020-04-06 13:48:57
css
files32, 2020-04-06 13:48:57

How to wrap columns in a table using CSS?

How to wrap columns in a table using CSS?
There is a table

<table>
<tr>
<td>1</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td>
</tr>
</table>


If you look through the phone, then it goes to the right and you need to scroll it. As soon as through CSS to make it so that the cells are transferred to the other side, so that there is no horizontal scrolling?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexVOK, 2020-04-08
@AlexVOK

@media screen and (max-width: 568px) {
  table td {
    display:inline-block;
  }
}

Specify a different style in styles for screens for phones. For example, you can change their display to make a transfer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question