javascript - Scrollbar to horizontal div -
i have csgo gamble site , want current items in pot show in horizontal div scrollbar have done
here code of it:
<?php @include_once('set.php'); @include_once('steamauth/steamauth.php'); @include_once "langdoc.php"; $lang = $_cookie["lang"]; $gamenum = fetchinfo("value","info","name","current_game"); if(!isset($_session["steamid"])) $admin = 0; else $admin = fetchinfo("admin","users","steamid",$_session["steamid"]); $ls2=0; //$rs69 = mysql_query("select * `game".$gamenum."` group `userid` order `id` desc"); $rs69 = mysql_query("select * `game25` group `userid` order `id` desc");?> <?php if(mysql_num_rows($rs69) == 0): ?> <?php else: ?> <?php $row69 = mysql_fetch_array($rs69); ?> <?php if(!empty($row69['userid'])): $ls2++; $avatar = $row69["avatar"]; $userid = $row69["userid"]; $username = fetchinfo("name", "users", "steamid", $userid); $usn = '"item" title="'.$username.'"'; $steamid = fetchinfo("steamid", "users", "steamid", $userid); $rs2 = mysql_query("select sum(value) value `game".$gamenum."` `userid`='$userid'"); $row = mysql_fetch_assoc($rs2); $sumvalue = $row69["value"]; ?> <?php //item stuff //$rs322=mysql_query("select * `game".$gamenum."` `userid`='$userid' order `value` desc "); //$rs322=mysql_query("select * `game25` order `value` desc "); $rs322=mysql_query("select * `game".$gamenum."` order `value` desc "); while ($row699 = mysql_fetch_array($rs322)): $imglnk = 'http://steamcommunity-a.akamaihd.net/economy/image/'.$row699["image"].'/70fx58f'; $wepprice = $row699['value']; $weppname = $row699['item']; $height="0"; $ipx="px;"; $heipx = $height.' '.$ipx; ?> <div class = "itemsdrop"> <div class ="dropitems"> <img src=<?php echo $imglnk; ?> class="mcs_img_loaded"> </div> <div class="col-lg-11 desc"> <span class ="number hide"></span> </div> </div> </div> <?php $height = $height + "15"; ?> <?php endwhile; endif; //end if(!empty...) endif; ?>
css:
.itemsdrop { background:#fff; float:left; position:relative; } .dropitems { overflow:hidden; overflow-x:scroll; }
does can me? nice working.
here's simple example of horizontal scrolling.
basically, need assign following properties outside (parent) element (in case, think .itemsdrop
):
white-space: nowrap; overflow-x: scroll;
this allow inside elements scroll horizontally.
the problem code adding horizontal scroll each box, not parent element.
Comments
Post a Comment