Jump to content

Pilot Roster - Align Columns


hecrowell

Recommended Posts

  • Administrators

Can you post the code for that page?

I think I had something similar at first - but don't recall how I fixed it. It may have been by defining a specific/static width for each column. If I recall, each column or the header may be based on a percentage of total width and that width dynamically fluctuates based on the number of characters in each cell within the table. Setting a static column width might fix it.

Edited by ProAvia
Link to comment
Share on other sites

  • Administrators

I think the file is pilots_list.php - the default file is in /core/templates. If you already customized this file, it may be in your skin folder (/lib/skins/(your_skin_name).

To paste code here, use the ' <> ' in the menu and then copy the code from your file and paste it here.

Link to comment
Share on other sites

Something like this will do it. You have to edit your pilot_list.php or tpl file:

 

<tr>
    <th align= "center" width="100px">Avatar</th>
    <th align= "center" width="100px">Pilot Hub</th>
    <th align= "center" width="100px">ID</th>
    <th align= "center" width="200px">Name</th>
    <th align= "center" width="100px">Rank</th>
    <th align= "center" width="100px">Flights</th>
    <th align= "center" width="100px">Hours</th>
    <th align= "center" width="100px">Vatsim</th>
    <th align= "center" width="100px">IVAO</th>
    <th align= "center" width="100px">Status</th>

</tr>

This is how I lined mine up! I think I got the code here somewhere! Of course you edit it for your options!

Link to comment
Share on other sites

15 hours ago, shakamonkey88 said:

The problem with that code is that it isn't responsive with set px values and doesn't care up/down correctly. I'm pretty sure the answer is that it's missing a div somewhere. Once I get to work, I'll have a look and post it here. 

True it Is not responsive but it does work :)

Link to comment
Share on other sites

  • Moderators

It really works but if you simply change the "px" values to percent values, everything is going to work fine. For example:

 <tr>
    <th align= "center" width="10%">Avatar</th>
    <th align= "center" width="10%">Pilot Hub</th>
    <th align= "center" width="10%">ID</th>
    <th align= "center" width="20%">Name</th>
    <th align= "center" width="10%">Rank</th>
    <th align= "center" width="5%">Flights</th>
    <th align= "center" width="5%">Hours</th>
    <th align= "center" width="10%">Vatsim</th>
    <th align= "center" width="10%">IVAO</th>
    <th align= "center" width="10%">Status</th>

</tr> 

 

Link to comment
Share on other sites

17 hours ago, servetas said:

It really works but if you simply change the "px" values to percent values, everything is going to work fine. For example:


 <tr>
    <th align= "center" width="10%">Avatar</th>
    <th align= "center" width="10%">Pilot Hub</th>
    <th align= "center" width="10%">ID</th>
    <th align= "center" width="20%">Name</th>
    <th align= "center" width="10%">Rank</th>
    <th align= "center" width="5%">Flights</th>
    <th align= "center" width="5%">Hours</th>
    <th align= "center" width="10%">Vatsim</th>
    <th align= "center" width="10%">IVAO</th>
    <th align= "center" width="10%">Status</th>

</tr> 

 

So it will be responsive now? If so nice, and thanks!

 

Link to comment
Share on other sites

13 hours ago, servetas said:

Try it ;)

I will? So apparently because I have and area with the Active area in a box that part is not working correctly, or it just goes to a certain screen size. I other words won't work on say a cell phone?

2017-09-20_1611

 

So basically I am causing the problem now :) If it was the default code it would work? And the default columns, etc...

Edited by jnascar
Link to comment
Share on other sites

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.

Loading...
×
×
  • Create New...