N
N
Nadezhda Golovina2020-05-19 04:43:59
css
Nadezhda Golovina, 2020-05-19 04:43:59

How to adapt a table in Bitrix?

Bitrix has a table in the product card (on the right) .
In a mobile phone, it turns out like this:
5ec338d00e3ce172265947.jpeg
Tell me how to make it adaptive?
The best option is a way to wrap words on a new line, like in exel. To fit the entire table. Like here:
5ec33d9637332107993693.jpeg
But I suppose that I will have to re-impose, with the expectation of an adaptive.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nadezhda Golovina, 2020-05-19
@Golovina90

Invented my own bike) Here is the result:
5ec3dd600002d983890723.jpeg
5ec3dd69ad03c477280372.jpeg
Adaptive via @ media:

@media screen and (max-width: 800px) {
  table.kartochka td {display: block;}
  table.kartochka td::before {
    content: attr(data-label);
    float: left;
    font-size: 17px;
    margin-top: 2px;
    margin-right: 20px;
  }
  table.kartochka td.align::before, table.kartochka td.align-old::before {
    font-size: 27px;
    font-weight: 300;
  }
  table.kartochka td.align::before {
    color: #87b523;
  }
  .btn {font-size: 16px !important;}
  .name-baza, .name-on_photo, .span-price, .span-old_price {
    /*float: left;*/
  }
  .good .right .btn {
  padding-left: 0;
  padding-right: 0;
  }
  table.kartochka .colspan {
    display: none;
  	}
}

A
Andrey Nikiforov, 2020-05-19
@squitcher

Try to reinvent the wheel from this https://codepen.io/true404/pen/jxxQRx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question