Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/158248-need-some-oppinions/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/158248-need-some-oppinions/#findComment-834875
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.