html 如何将下面的图片改成横排显示啊!!

html 如何将下面的图片改成横排显示啊!!,第1张

<!--f4--><divclass="f11"><ahref="/a/n/hd/"><imgsrc="/templets/default/theme/bg/1_07.gif"></a>

</div>

<!--f4--><divclass="page"><divclass="dede_pages"><ulclass="pagelist">

<li style="float:left"  >首页</li>

<li style="float:left"    class="thisclass">1</li>

<li style="float:left"  ><ahref='list_11_2.html'>2</a></li>

<li style="float:left"  ><ahref='list_11_2.html'>下一页</a></li>

<li style="float:left"  ><ahref='list_11_2.html'>末页</a></li>

<li style="float:left"  ><selectname='sldd'style='width:34px'onchange='location.href=this.options[this.selectedIndex].value'><optionvalue='list_11_1.html'selected>1

  </option>

  <optionvalue='list_11_2.html'>2

  </option>

  </select>

</li>

<li style="float:left"  ><spanclass="pageinfo">共 <strong>2</strong>页<strong>13</strong>条</span></li>

</ul>

</div>

</div>

</div>

<!--s3 end--><!--footer-->

</div>

<!--footer--><divclass="bottom">

</div>

横排显示添加 float:left样式即可

因为你用的模板,传的是一个array,每循环一次生成一个DIV,所以要把循环开始<!-- BEGIN nameArr.Name -->放在<div class = "userList">前面,改成这样

========================================

html:

<div class="showUser">

<fieldset>

<legend>俱乐部成员</legend>

<!-- BEGIN nameArr.Name -->

<div class = "userList">

<p> </p>

<p><a href="./index.php?id={uid}">{userName}</a></p>

<!-- IF avatar = "" -->

<p><a href="./index.php?id={uid}" ><img src = "/team5/v0.6/upload/_static/picture/avatar/default.jpg"></a></p>

<!-- ELSE -->

<p><a href="./index.php?id={uid}" ><img src = "/team5/v0.6/upload/_static/picture/avatar/{avatar}"></a></p>

<!-- ENDIF -->

</div>

<!-- END nameArr.Name -->

</fieldset>

<div class="clear"></div>

</div>

==========================================

css:

.showUser{

width:780px

padding:10px

}

.showUser legend {

margin-bottom:20px

font-size:200%

}

.userList{

margin-bottom:5px

word-break:break-all

word-wrap:break-word

float:left

}

.userList img {

margin:5px 19.5px

border:4px solid #d7e1ed

display:block

}

.userList a {

margin:5px 19.5px

color:#444

text-decoration:none

}

.userList a:hover {

color:#888

text-decoration:none

}

===========================================

function getName()

{

global $DB,$mysql_prefix

$nameArr = array()

$con = mysql_connect("localhost", "root", "admin")

if (!$con)

{

die('Could not connect: ' . mysql_error())

}

$db_selected = mysql_select_db("micblog",$con)

$sql = "SELECT `UID`, `AVATAR`, `USERNAME` FROM `WEIQU_USERINFO`"

$result = mysql_query($sql,$con)

while($Re = mysql_fetch_array($result))

{

$nameArr[] = array(

"uid"=>strip_tags($Re['UID']),

"userName" =>strip_tags($Re['USERNAME']),

"avatar" =>strip_tags($Re['AVATAR']),

)

}

$return['Name'] = $nameArr

return $return

}

你说的是这个意思吧?

有什么问题站内消息联系我!

<style>

li{

width:200pxfloat:left

}

</style>

<LI>

<DIV class=test2>

<DIV class=pic_200><A onfocus=this.blur()href="http://s.click.alimama.com/ma_a?e=7TbROtwEfhtM4HIoyQXrzh6E1%2Fnbeh%2FFIQj38gxRR9lJ%2FH1scfUayN6bH6oYCOZGDVdpeyju4P0XtICf8fv86YXCP82qWS3UJuFSRg2ngqyOK5C3pQkkwqC%2BkGy6ouKxspaobOTxvl65Iht9uW591NkY6qAe5j1lq96lfriCZsNUfs3gN0AzzSvQKWGeaovYLn%2FEbKqt%2BMZzU%2FvxzvGUWF9mWzvs0CNZWTy8NdETCL2CSkYfmSlrtpnUu6u7M6qqj16DNDwgL%2F0uUMQ%2FiWn4J9KXrdne3Rcy&c=35e6227990402fcdbecb9ad33ac982d6" target=_blank><IMG class=img160 src="http://img01.taobaocdn.com/bao/uploaded/i1/T1OvRbXkhjiZCzS.U__081049.jpg_b.jpg"></A></DIV>

<DIV class=HackBox></DIV><A onfocus=this.blur()href="http://s.click.alimama.com/ma_a?e=7TbROtwEfhtM4HIoyQXrzh6E1%2Fnbeh%2FFIQj38gxRR9lJ%2FH1scfUayN6bH6oYCOZGDVdpeyju4P0XtICf8fv86YXCP82qWS3UJuFSRg2ngqyOK5C3pQkkwqC%2BkGy6ouKxspaobOTxvl65Iht9uW591NkY6qAe5j1lq96lfriCZsNUfs3gN0AzzSvQKWGeaovYLn%2FEbKqt%2BMZzU%2FvxzvGUWF9mWzvs0CNZWTy8NdETCL2CSkYfmSlrtpnUu6u7M6qqj16DNDwgL%2F0uUMQ%2FiWn4J9KXrdne3Rcy&c=35e6227990402fcdbecb9ad33ac982d6" target=_blank><SPAN class=tit>累计出售1500件极力推荐的大喇叭袖兔毛皮草,无</SPAN><SPAN class=NewPrice>促销价:228.00元</SPAN>

<DIV class=view_baby_info><SPAN>查看商品详情</SPAN></DIV></A>

<DIV class=HackBox></DIV></DIV></LI>

<LI>

<DIV class=test2>

<DIV class=pic_200><A onfocus=this.blur()href="http://s.click.alimama.com/ma_a?e=7TbROtwEfhtM4HIoyQXrzh6E1%2Fnbeh%2FFIQj38gxRR9lJ%2FH1scfUayN6bH6oYCOZGDVdpeyju4P0XtICf8fv86YXCP82qWS3UJuFSRg2ngqyOK5C3pQkkwqH02ZFAFwIGHPIy2MWMQGr%2FFSj5UTClPqZzmQGLGI7EWjR84NARbF972m%2F557dKWWSbDCp3tON2BN179AtXBJdH3LM7%2F20GcCHksmuJAavH6vRwfCT5hoYg05Ot%2Bi5iCPeY%2Few2W8j7D1uxlur82ElGsQ8fPLRieHN92SqfKSJc&c=588077adb31f48fe29ba0269bed5c9f2" target=_blank><IMG class=img160 src="http://img06.taobaocdn.com/bao/uploaded/i6/T115haXbi0ftDtLBLX_p.jpg_b.jpg"></A></DIV>

<DIV class=HackBox></DIV><A onfocus=this.blur()href="http://s.click.alimama.com/ma_a?e=7TbROtwEfhtM4HIoyQXrzh6E1%2Fnbeh%2FFIQj38gxRR9lJ%2FH1scfUayN6bH6oYCOZGDVdpeyju4P0XtICf8fv86YXCP82qWS3UJuFSRg2ngqyOK5C3pQkkwqH02ZFAFwIGHPIy2MWMQGr%2FFSj5UTClPqZzmQGLGI7EWjR84NARbF972m%2F557dKWWSbDCp3tON2BN179AtXBJdH3LM7%2F20GcCHksmuJAavH6vRwfCT5hoYg05Ot%2Bi5iCPeY%2Few2W8j7D1uxlur82ElGsQ8fPLRieHN92SqfKSJc&c=588077adb31f48fe29ba0269bed5c9f2" target=_blank><SPAN class=tit>疯甩价(218元)!出口韩国的小西装领皮草/粉(</SPAN><SPAN class=NewPrice>促销价:218.00元</SPAN>

<DIV class=view_baby_info><SPAN>查看商品详情</SPAN></DIV></A>

<DIV class=HackBox></DIV></DIV></LI>

<LI>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/6275114.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-19
下一篇 2023-03-19

发表评论

登录后才能评论

评论列表(0条)

保存