angel_ Well-Known Member Licensed User Longtime User Sep 17, 2022 #1 Is it possible to align text in an SKTable?, I have tried this but it does not work: B4X: SKTable1.Style = $"{"text-align":"center"}"$
Is it possible to align text in an SKTable?, I have tried this but it does not work: B4X: SKTable1.Style = $"{"text-align":"center"}"$
Solution alwaysbusy Sep 19, 2022 Works fine here (second column the numbers are centered). I did not do the header so it would be visible. Must be something in your css (maybe the case of the the #id is wrong) CSS: Code: #if CSS #sktable1 tbody tr td:nth-child(2) { text-align: center; } #end If Alwaysbusy
Works fine here (second column the numbers are centered). I did not do the header so it would be visible. Must be something in your css (maybe the case of the the #id is wrong) CSS: Code: #if CSS #sktable1 tbody tr td:nth-child(2) { text-align: center; } #end If Alwaysbusy
alwaysbusy Expert Licensed User Longtime User Sep 19, 2022 #2 Try something like this: Align text in the second column to the center of the table with id="myTable" Code: #if CSS /* header */ #myTable thead tr th:nth-child(2) { text-align: center; } /* value */ #myTable tbody tr td:nth-child(2) { text-align: center; } #end If Upvote 0
Try something like this: Align text in the second column to the center of the table with id="myTable" Code: #if CSS /* header */ #myTable thead tr th:nth-child(2) { text-align: center; } /* value */ #myTable tbody tr td:nth-child(2) { text-align: center; } #end If
angel_ Well-Known Member Licensed User Longtime User Sep 19, 2022 #3 No, it doesnn't work, I enter the code after loading the layout but it doesn't change the alignment Upvote 0
alwaysbusy Expert Licensed User Longtime User Sep 19, 2022 #4 Works fine here (second column the numbers are centered). I did not do the header so it would be visible. Must be something in your css (maybe the case of the the #id is wrong) CSS: Code: #if CSS #sktable1 tbody tr td:nth-child(2) { text-align: center; } #end If Alwaysbusy Upvote 0 Solution
Works fine here (second column the numbers are centered). I did not do the header so it would be visible. Must be something in your css (maybe the case of the the #id is wrong) CSS: Code: #if CSS #sktable1 tbody tr td:nth-child(2) { text-align: center; } #end If Alwaysbusy
angel_ Well-Known Member Licensed User Longtime User Sep 20, 2022 #5 You were right, it was a problem with the capitalization of the table name in CSS. Also noticed that code swapping it doesn't work when the code is inside #If CSS, is that correct? Upvote 0
You were right, it was a problem with the capitalization of the table name in CSS. Also noticed that code swapping it doesn't work when the code is inside #If CSS, is that correct?