glenelkins Posted May 15, 2009 Share Posted May 15, 2009 Hi I just need some oppinions on the best way to lay out a tournament bracket I have written a system which took god knows how much research and faffing around to get the generation of player slots. Now the only issue left is the layout. The best method I can see is using tables because i can use valign="middle" to positon the players correctly through the rounds like this for example: <table> <tr> <td>Player</td> <td rowspan="2">Player</td> </tr> <tr> <td>Player</td> </tr> </table> That would layout a 2 player tournament bracket. Now the question is, how would I go about making this within a loop say if there was 8 players, each round goes down by 2 players and need vertically aligning against the previous 2 players ( make sense? ). But i cant get my head around how the table generation would work as I need to rowspan some columns so they match up correctly i bet im making no sense! Quote Link to comment https://forums.phpfreaks.com/topic/158248-need-some-oppinions/ Share on other sites More sharing options...
JonnoTheDev Posted May 15, 2009 Share Posted May 15, 2009 i bet im making no sense! Not really and using tables is not always the best option. Do you understand CSS? If so you can set all the layout, sizes, etc within the stylesheet. All you need to loop is i.e foreach() { print "<div id='container'></div>"; } Our designers make all kinds of layouts like this and I just embed them in loop. For instance the above container may start on a new line after every 4 containers. Its all done with CSS. Quote Link to comment https://forums.phpfreaks.com/topic/158248-need-some-oppinions/#findComment-834875 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.