Tylor Eddy Posted December 17, 2009 Report Share Posted December 17, 2009 Gday Guys Can someone point me in the right direction with this. My Roster and footer are not centered correctly(only on the Pilot Roster Page for some reason). Im not sure what files need to be edited. Thanks Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 17, 2009 Author Report Share Posted December 17, 2009 heres my problem Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 17, 2009 Administrators Report Share Posted December 17, 2009 Seems like maybe you're missing a float in the parent div Quote Link to comment Share on other sites More sharing options...
faraz Posted December 17, 2009 Report Share Posted December 17, 2009 I have problem with pilot roster ! please see image at below link : Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 17, 2009 Administrators Report Share Posted December 17, 2009 Used fixed width colums Quote Link to comment Share on other sites More sharing options...
faraz Posted December 17, 2009 Report Share Posted December 17, 2009 HI please Explain more or if possible give me code for pilot roster! TNX Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 18, 2009 Author Report Share Posted December 18, 2009 ok, what do i edit?, and how do i fix the parent <div> ? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 18, 2009 Administrators Report Share Posted December 18, 2009 Not in the parent div, but in the table columns (<td>) tags, use a fixed width Quote Link to comment Share on other sites More sharing options...
infidel Posted December 19, 2009 Report Share Posted December 19, 2009 Not in the parent div, but in the table columns (<td>) tags, use a fixed width Nabeel - having similar issues and your answer, I am sure, is perfectly understandable to folks that have program experiance (I had never done anything like this until last week). Anyway to explain in more detail? how do we use fixed width? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 19, 2009 Administrators Report Share Posted December 19, 2009 Sorry, no problem. You probably have something like this: <table> <tr> <td>Column one</td> <td>Column two</td> </tr> </table> Fixed width would be: <table> <tr> <td width="50%">Column one</td> <td width="50%">Column two</td> </tr> </table> Or the width could be a pixel value: <td width="130px"> Right now there's no fixed width, so they're just automatically sizing to the content. So much make all the columns (the <td> are columns) with that width Quote Link to comment Share on other sites More sharing options...
infidel Posted December 19, 2009 Report Share Posted December 19, 2009 Sorry, no problem. You probably have something like this: <table> <tr> <td>Column one</td> <td>Column two</td> </tr> </table> Fixed width would be: <table> <tr> <td width="50%">Column one</td> <td width="50%">Column two</td> </tr> </table> Or the width could be a pixel value: <td width="130px"> Right now there's no fixed width, so they're just automatically sizing to the content. So much make all the columns (the <td> are columns) with that width Thanks man, sometimes ya gotta talk to me like I am four. Too many hits to the head and jumps out of perfectly good airplanes tend to do that to you. Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted December 19, 2009 Moderators Report Share Posted December 19, 2009 Thanks man, sometimes ya gotta talk to me like I am four. Too many hits to the head and jumps out of perfectly good airplanes tend to do that to you. did the to many hits to the head let you jump out off perfectly good airplanes ;D we normaly wait until the plane is on the blocks and the stairs are connected ;D ;D Quote Link to comment Share on other sites More sharing options...
CPC900 Posted December 20, 2009 Report Share Posted December 20, 2009 So what file is that located in.....sorry, I guess I need to be talked to like I am two. I should know, but I am having a brain cramp. Bruce Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 Seems like maybe you're missing a float in the parent div Ok can you explain this to me a bit simpler please. Im new to this manual coding lol. Thanks for all your help so far Love PhpVMS! Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 Ok can you explain this to me a bit simpler please. Im new to this manual coding lol. Thanks for all your help so far Love PhpVMS! The parent div style probably needs a float: style="float: left" I'm not sure exactly what, but you might have to Google the problem and mess with the CSS. It's a bit difficult to tell just by looking at it Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 Ok , but what file am i looking at? where is the roster located ? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 The pilots table is located in the pilots_list.tpl file Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 Thanks, unfortunately i couldn't get it to line up correctly. it's a bit more complicated for me. here's what my pilot_list.tpl folder looks like now <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ ?> <tr> <td width="1%" nowrap><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> Thanks for all the help so far. Hopefully we can work out this little delema now Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 for example to set a column width in that file <td width="25%"><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> notice the <td width="25%"> set a width for each column and make sure they add up to 100% Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 so in other words, ( i think, im not sure ) but for ever <td> i change them to <td width="25%"> then they all have to be the same so they are aligned? what do you mean by they have to equal up to 100% thanks Sorry, but im still learning the loops. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 a sample row might contain <tr> <td width="25%">do stuff</td> <td width="10%">do stuff</td> <td width="40%">do stuff</td> <td width="5%">do stuff</td> <td width="20%">do stuff</td> </tr> the table will then align all the columns to your preset widths. The total of all the "widths" = 100% Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 sorry, im having no luck here. i understand what its doing, but i dont understand how to implement it to my bit of code. i gave it a shot but it didnt budge. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 post your table code so we can see what you are doing, it will help us help you Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 20, 2009 Author Report Share Posted December 20, 2009 <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { /* To include a custom field, use the following example: <td width="10%"> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ ?> <tr> <td width="10%"><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td width="10%"> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td width="10%"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td width="10%"><?php echo $pilot->totalflights?></td> <td width="10%"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 can you post or pm me the link to your page - it looks ok from here other than the widths only add up to 50%, which should still make the columns align Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted December 20, 2009 Administrators Report Share Posted December 20, 2009 Instead of 10%, I would take the width ofyour page in pixels, divide by the number of columns, and use that, if you're using fixed width. But I might just be confusing you more Quote Link to comment 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.