horizontal scroll from while loop
Hmmmm, I accidently posted this in the wrong forum. Is there a way to move it?
Hey, ive been trying for several hours now to get the list horizontal with scroll instead of vertical.
the divs stacks up to the right but wraps at the end of the div no matter what?! :(
here's my code:
<div class="container" style="width:600px;height:200px;overflow-x: scroll;overflow-y: hidden; white-space: nowrap;">
<?php
$sql26 = "SELECT * FROM db ORDER BY Id_kund desc";
$result26 = mysql_query($sql26) or die (mysql_error());
while ($row26 = mysql_fetch_array($result26))
{
if($row26["poang"] <= 20){
$star = 1;
}
elseif($row26["poang"] <= 30){
$star = 2;
}
elseif($row26["poang"] <= 40){
$star = 3;
}
elseif($row26["poang"] <= 50){
$star = 4;
}
else{
$star = 5;
}
echo "<div class='view view-tenth' style=\"float:left;display:inline-block;\"><img src=\"foretag/eff/Presentationer/{$test}/".$row26["Matningsnamn"]."/enheter/1.png\" wIdth=\"200\" height=\"200\" style=\"position: absolute;\">
<div style=\"background:black;opacity:0.6;width:200px;height:30px;\"></div>
<img src=\"img/stars/STARS2/3/$star.png\" style=\"position: absolute; float:right; top: 5px; left: 3px;width:90px;z-index:1111;\"> <H6 style=\"font-size:11px;color:white;position: absolute;top: 9px; left: 106px;z-index:3311;\">".date("M,Y", strtotime($row26['Datum_formatning']))."</H6>
<div class='mask'>
<h2 style=\"text-transform: uppercase;color: #333;width:120px;text-align: center;position: relative;font-size: 15px;border-bottom: 1px solid rgba(0, 0, 0, 0.3);background: transparent;margin: 0px 10px;padding: 5px;\">".$row26["Matningsnamn"]."</h2>
<p>Kanal: <b>".$row26['Kanal']."</b></p>
<p>Intentionsförflyttning: <b>".$row26['Nyfikenhet']." enheter</b> </p>
<a class='info' href='http://xxx/main.php?id=3&scroll=".$row26[Id]."'>Gå vidare</a>
</div>
</div>";
} ;
?>
</div>
Cheers
Adam