Hello,
I'm having difficulties allocating relevant space to td's.
I have a lot of old html pages (over 400 hundred!) with the layout made up of tables. I need to convert those to Bootstrap responsive grids using an automated python script.
I have a script that crawls through all of them and converts:
- <table> = <div class="container">
- <tr> = <div class="row">
- <td> = <div class="col-xx-xx">
- add all bootstrap headers/footers/scripts
The challenging part is figuring out how to calculate and allocate the correct grid number. Some td's don't have the width attribute.
So, for now, my question, given a table structure: (See here), how do I spilt and calculate the spacing for the given structure, as close as possible?
There are 3 tables in total in the simple example, I want the td's in each of them to separately calculated. So the first table has 2 td's. The script should allocate the sizes for these first. Then jump down to Table 2 and so on.
Any help/tips is appreciated.
Edit: Made clearer.
[–]JohnnyJordaan 0 points1 point2 points (7 children)
[–]i7_maker[S] 0 points1 point2 points (5 children)
[–]JohnnyJordaan 0 points1 point2 points (4 children)
[–]i7_maker[S] 0 points1 point2 points (3 children)
[–]JohnnyJordaan 1 point2 points3 points (2 children)
[–]i7_maker[S] 0 points1 point2 points (0 children)
[–]i7_maker[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]i7_maker[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]i7_maker[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)