Сделать таблицу адаптивной к мобильному телефону

Сделать таблицу адаптивной к мобильному телефону

VladimirrimVladimirrim Posts: 2Questions: 1Answers: 0
edited March 2020 in Free community support

Здравствуйте.
Подскажите пожалуйста, как мне сделать свою таблицу читаемой в мобильном телефоне? Текст выходит за границы и свертывание столбцов происходит частично.

На компьютере все работает правильно: https://eisv.ru/1-2/

Вот код страницы: http://live.datatables.net/qelopoqo/2/edit

Answers

  • rf1234rf1234 Posts: 2,946Questions: 87Answers: 416

    Translated your post using deepl.com

    "Hello.
    Can you please tell me how to make my table readable on my mobile phone? The text is out of bounds and the columns are partially collapsed.

    Everything works correctly on your computer: https://eisv.ru/1-2/.

    Here's the code for the page: http://live.datatables.net/qelopoqo/2/edit."

    I tried it and it worked fine - also on small browser windows. And yes the columns are partially collapsed. That is what responsive mode is about.

  • VladimirrimVladimirrim Posts: 2Questions: 1Answers: 0

    Если заходить на сайт с помощью мобильного телефона, к сожалению, это перестает работать.

    Подскажите пожалуйста, как мне ширину столбцов подогнать под размер текста в ячейках? Я имею ввиду сделать так, что бы столбцы автоматически изменяли ширину, в зависимости от размера введенного текста.

    И почему-то не получается сделать количество столбцов больше чем 6 (шесть). Как и это можно было бы исправить?

  • rf1234rf1234 Posts: 2,946Questions: 87Answers: 416

    Translation below. Maybe somebody else can help?

    "If you enter the site using your mobile phone, unfortunately, it stops working.

    Can you please tell me how to adjust the width of the columns to the size of the text in the cells? I mean to make sure that the columns automatically change the width, depending on the size of the entered text.

    And for some reason it is not possible to make the number of columns greater than 6 (six). How could this be corrected, too?"

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Your page (https://eisv.ru/1-2/) isn't initialising a DataTable - so the Responsive isn't present. I tried to debug but it runs so slow it's impossible to get anything. As rf1234 said, everything works in the fiddle, so use that as a template.

    Colin

This discussion has been closed.