dqhgjay5753 2013-08-22 13:26
浏览 36

将图像滑块中的图像对齐仅用于镀铬

I'm editing a website that contains an image slider that displays two images side-by-side, however when i view the website in chrome the images are not inline with each other like so: http://i754.photobucket.com/albums/xx182/rache_R/Untitled-1_zps6f3014ef.jpg

I use php and html to get data from a database and display the images based on the data gathered. I have tried to target the images individually in my css but it either doesn't work or effects both images.

Is there a correct way of targeting the images individually or how can i fix this?

php code:

<?
                $result = $mysqli->query("SELECT * FROM stock");
                while($obj = $result->fetch_object())
                {
                    if($obj->id&1)
                        echo "<u1>"; ?>


                    <li class="<?=$obj->orientation=='landscape'?'landscape':'portrait'?>">
                        <a href="#"><img src="./img/<?=$obj->description=='unframed'?$obj->poster_no:$obj->poster_no.'_frame'?>.jpg" alt=""></a>
                        <h4><?= $obj->description=="unframed"?"Unframed Poster - 750mm x 500mm":"Framed Poster - 790mm x 540mm"?><br />&pound;<?=$obj->price?> each</h4></li>

so i managed to solve it:

@media screen and (-webkit-min-device-pixel-ratio:0){
   #mi-slider li {
    vertical-align: top;
    }}
  • 写回答

2条回答 默认 最新

  • dsce23640 2013-08-22 13:30
    关注

    Place the < ul> having a width so much that it can hold both images side by side and give style='display:inline' for the ul.. You will get the images inline

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?