WebSite X5Help Center

 
Hanafi Salman
Hanafi Salman
User

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

Author: Hanafi Salman
Visited 867, Followers 2, Shared 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..

Posted on the
8 ANSWERS - 4 USEFUL - 1 CORRECT
Hanafi Salman
Hanafi Salman
User
Author

screenshot:

  

Read more
Posted on the from 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>

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
Daniel W.
Daniel W.
User

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/en/post/253566

-----

Read more
Posted on the from Daniel W.
Hanafi Salman
Hanafi Salman
User
Author

Done and it works.. I just know it smile

Thank you so much @KolAsim..

Read more
Posted on the from 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/en/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

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
Hanafi Salman
Hanafi Salman
User
Author

Wow.. https://helpcenter.websitex5.com/en/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

Read more
Posted on the from Hanafi Salman