If I have a table structured like this:
<table id="tableid">
<tbody>
<tr>
<td id="id1">Button A</td>
<td id="id2">Button B</td>
<td id="id3">Button C</td>
<td id="id4">Button D</td>
</tr>
</tbody>
</table>
Is it possible to make the items position in a specifically defined order without switching them around in html and without using absolute positions (and without use of js)?
Like if I wanted them to display from top to bottom: id2, id4, id1, id3.
It's for a website that allows customizing css styles for your profile, but doesn't allow manipulation of the html itself so I can't simply switch the order of them around in html.
Using absolute positioning works but it's pretty awkward manually defining positions because if I adjust the position of 1 item then I need to manually do it for all of them.
If absolute position is the only way, then is it possible to define the absolute position of an item to be the same position defined for another + an amount? So for example, could I define id2 with top: 200px and then for id4 can I retrieve that top value from id2 and add 10px to it or would I need to manually set it as 210px?