I have created a set of tables to display football (soccer) fixtures. I want sets of two tables adjacent to each other. If I use div or table id the tables float correctly but I get duplicate id validation errors. When I use div class instead the tables do not float. div class and table id can be seen here :
There will be 38 tables in total on one page. That's why I don't want to use separate IDs or divs for each table. Admittedly it's only half a line of css for each div but I thought there would be a simpler solution.
As each div needs a unique ID you would have to name 38 different divs and use an opening and closing div for each table which means more code. This code validates :
<table id="tr1"> </table>
<table id="tr2"> </table>
<table id="tr3"> </table>
Whereas this would give duplicate ID validation errors, which was the original problem :
IF the fixtures were read top to bottom that would be the ideal solution but they're read from left to right so you would need to use the left div class for the fixtures for the odd numbered rounds and the right div class for the even which means more work e.g. I would have to enter round 1 in the left div class, round 2 in the right then go back up into the left div class to enter round 3 then down into the right to enter round 4 etc, etc.
http://soccer-europe.com/seriea/Fixtures.html
The table css :
HTML :
You can still give each table it's own ID.
http://codepen.io/Paulie-D/pen/aGtzH
Pen updated to give tables a class instead of ID.
http://codepen.io/Paulie-D/pen/aGtzH
See the example. 2 IDs only...one for each div.
Whereas this would give duplicate ID validation errors, which was the original problem :
That's 2 ids only and you don't have to give each table an ID.
See: http://codepen.io/Paulie-D/pen/aGtzH
OK...lemme think.