WebSite X5Help Center

 
Hanafi Salman
Hanafi Salman
User

How to Auto resize tableobject X5 (cell to fit the text size)  en

Auteur : Hanafi Salman
Visité 96, Followers 0, Partagé 0  

Need help.. @Daniel gave me the solution for filter search modified code from w3schools using Table object X5..
If purely I am using TableObjectX5 independently, text in a cell column that exceeds the number of words does not automatically change into wrap text to fit view for smartphones

The comparison is below:

test page > https://ica.web.id/daftartel2.html
using TableObject WebsiteX5
The column is as the same size both for desktop and smartphone view, then should be scroll right for smartphone view

test page > https://ica.web.id/daftartel3.html
using manual input in HTMLObject websiteX5
The column automatically resize and the word wrapped for smartphone view

Thanks anyway..

Posté le
8 RéPONSES - 4 UTILE - 1 CORRECT
Hanafi Salman
Hanafi Salman
User
Auteur

screenshot:

  

Lire plus
Posté le de Hanafi Salman
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

...it doesn't search columns...
...to make the table elastic, you can use this old idea of ​​mine:
<style>table, table *{width:100% !important}</style>

.

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
Daniel W.
Daniel W.
User
Meilleur utilisateur du mois DEMeilleur utilisateur du mois EN

Here is the Javascript code that is added below the existing Javascript code.

And the screenshot below shows the result.

-----

</script>
<style> table {word-break: break-word;} </style><script> $( document ).ready(function() { $("table").css("width", "");});

</script>

>> https://helpcenter.websitex5.com/fr/post/253566

-----

Lire plus
Posté le de Daniel W.
Hanafi Salman
Hanafi Salman
User
Auteur

Done and it works.. I just know it smile

Thank you so much @KolAsim..

Lire plus
Posté le de Hanafi Salman
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... that code was always an old invention of mine that became common use, born around the time of v.12...
>>https://helpcenter.websitex5.com/fr/post/78350
...now, even if it's still valid, it's become superfluous for current versions, for which the reduced code I posted earlier is sufficient...
.
bye, ciao

.

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
Hanafi Salman
Hanafi Salman
User
Auteur

Wow.. https://helpcenter.websitex5.com/fr/post/78350, since 12 years ago.. this script has become the forerunner and is very useful for people who need it..

I hope that all the solution you provided will be rewarded by God with goodness.

Thanks @KolAsim

Lire plus
Posté le de Hanafi Salman