T
T
Taron4uk2019-11-13 15:14:31
css
Taron4uk, 2019-11-13 15:14:31

How to split a cell into two parts (move to the next line) using Flexbox?

Prompt, please, with a question.
There is a table that comes out line by line on the PC, as shown in 1 screenshot.
5dcbf394be1e8182774791.jpeg
And you need to make two elements for each line, but in one cell, so that it is as shown in the 2nd screenshot.
* I need to make this option for the mobile version, but I can’t figure out how to do it all from the table,
give at least a hint, please)
Thank you very much in advance!
5dcbf3cba6eae789525813.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sergski, 2019-11-13
@Taron4uk

on flex:

tr {
    display: flex;
    flex-wrap: wrap;
  
    td {
          flex-basis: 50%;
          box-sizing: border-box;
    }
}

A
Artem Ivanov, 2019-11-13
@ns174ru

media queries or ready-made bootstrap classes, for example, will help you with this)

M
Meakin, 2019-11-14
@Meakin

display:flex;
flex-wrap: wrap;
на td
box-sizing:border-box;
flex-basis:45-50%;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question