Salve a tutti , ho questo codice:
codice:
$thread_qry = "SELECT * FROM `team_teams` , `team_player` WHERE team_name = name_team ORDER BY team_name";
$row = XenForo_Application::get('db')->fetchAll($thread_qry);
$teamCurrent = '';
foreach ( $row AS $rows ) {
if ($teamCurrent != $rows['name_team'])
{
$teamCurrent = $rows['name_team'];
echo ('
<div style="height:50px ; width:100%;margin-bottom: 5px ">
<div style=" height:50px; width97%;border: 3px solid #333; -webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;">
<div style="background-color:#111;background: url('.$rows['loca_team'].') no-repeat; background-position:center; height:50px; width: 100%;border-bottom: 2px solid #333">
<div style="height:10px ; width:100%"></div>
<div style="background-color:#111; height:10px; width:50%; margin-left:10px;padding:10px; font-size:20px; font-weight:600;line-height:10px; color:#EDEDED;opacity:0.8; "><label style="font-size:20px; font-weight:600; color:#ffff;opacity:1;" class="xeneSTitleLabel">'.$rows['name_team'].'</label><label style="font-size:14px; font-weight:100;opacity:1;; color:#ffff"> - '.$rows['game_team'].' - '.$rows['console_team'].'</label></div>
</div>
</div>
</div>
');
}
echo ('
<div style="height:150px ; width:140px ; background-color: #EDEDED; margin-bottom:5px ;">
<div style="height:140px ; width:120px; background-color:#f09; padding:5px;">
<div style="height:120px; width:80px; background-color:#fff">
<img src="avatar.php?userid='.$rows['id_player'].'" height="120px" width="120px"/>
</div>
<div style="height:20px; width:120px; background-color:#fff; text-align:center">
<label style="color:#333; font-weight:bold; font-size:12px; ">'.$rows['username_player'].'</label>
</div>
</div>
</div>
');
}
ma con questo codice suddivide ogni player in riferimento al singolo team ( come voglio io ) ma dispone ognuno dei player uno sotto l'altro mentre io vorrei che venissero visualizzati uno accanto all'altro. Ho gia provato ad inserire float:left e display:inline ma si scompone l'intera struttura , ho provato a suddividere il codice con una tabella ma si scompone lo stesso.
Credo che la soluzione sia un cambiamento di codice , se qualcuno mi può aiutare ?
Grazie.
P.S.: il risultato che vorrei è questo:
______________________
Nome del Team
______________________
Player1 | Player 2 | Player 3!
__________________________
invece adesso mi viene visualizzato cosi:
______________________
Nome del Team
______________________
Player 1
______________________
Player 2
______________________
Player 3
______________________
Attendo un aiuto ...