在PHP表中水平滚动div

在PHP表中水平滚动div,php,css,Php,Css,如何在此表中使用大量div进行水平滚动?我想做一个朋友酒吧 echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td style="">'; foreach($friends as $fr){ $friend = $ots->createObject('Account'); $friend->load($fr); $profile_img = $frie

如何在此表中使用大量div进行水平滚动?我想做一个朋友酒吧

echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td style="">';
foreach($friends as $fr){
$friend = $ots->createObject('Account');
$friend->load($fr);
$profile_img = $friend->getCustomField("profile_img");
foreach (array("/", "\\", "..") as $chan) { $profile_img = str_replace($chan, "", $profile_img); }
if (empty($profile_img) || !file_exists("account/profiles/".$profile_img)) { $profile_img = "default.png"; }
echo '<div style="border-right:1px solid #faf0d7;width:82px;height:82px;position:relative;float:left;background-image:url(account/profiles/'.$profile_img.');background-repeat:repeat-y;background-size:82px 82px;">'.$fr.'</div>';
}
echo '</td></tr></table>';
echo';
foreach($friends as$fr){
$friend=$ots->createObject('Account');
$friend->load($fr);
$profile\u img=$friend->getCustomField(“profile\u img”);
foreach(数组(“/”,“\\”,“.”)作为$chan){$profile\u img=str\u replace($chan,“,$profile\u img);}
如果(空($profile_img)| |!file_存在($profile_img)){$profile_img=“default.png”}
回音“.$fr.”;
}
回声';
请注意,div只能位于水平线上。
我已经尽我所能在网上找到了。请帮助:X

这将为您提供一个可滚动的表格单元格,其中包含
div
。在您的示例中,我不会在
divs
左侧浮动,而是使用
显示:内联块

tr > td {
overflow-x: scroll;
}