对齐我的图像,所以他们坐在彼此 [英] aligning my images so they sit next to each other

查看:108
本文介绍了对齐我的图像,所以他们坐在彼此的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我回应了一些图片,所有的工作正常,但我的问题是他们都走下页示例



image 1



image 2



image 3





image 1 image 2 image 3



等等。我试图添加内联到CSS为我的 div 标签,但它不工作...

 < div class =auction_boxstyle =height:150px> 

< form name =myformaction =userbox.phpmethod =POST>
< p> < / p>
< p> < / p>
< p> < / p>






< p align =center>< a href =smalldex.php?name = '。$ battle_get ['name']。'?KeepThis = true& amp; TB_iframe = true& amp; height = 400& amp; width = 600class =thickbox>< img src = //pokemontoxic.net/img/pokemon/'.$v->type.''.$battle_get['pic']。'width =height =border =0/> / a>< / p>
< p align =center>< span style =height:70px; text-align:center;>





名称:< br />'。$ v-> pokemon。 '< br />
级别:'。$ v-> level。'< br />
Exp:'。$ v-> exp。'< br / ;
性别:'。$ v-> gender。'< br />
Type:'。$ v-> type。'< br />

您想将您的宠物放入$ b的插槽


< select name =mydropdown>

< option value =1> ; 1< / option>
< option value =2> 2< / option>
< option value =3> 3< / option>
< option option =4> 4< / option>
< option value =5> 5< / option>
< option value =6> 6< / option> ;
< / select>


< input type =hiddenname =myNamevalue ='。$ v-> id。' >
< input type =submitvalue =submitname =submit>



< / form>
< / div>';

您可以看到 div auction_box 。我已经尝试了很多东西在CSS,但没有工作...我想他们彼此相邻。



你可以看到的图像是这个部分

 < p align =center>< a href =smalldex.php?name ='。$ battle_get ['name']。'?KeepThis = true& amp; TB_iframe = true& amp; height = 400& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; => .net / img / pokemon /'.$ v-> type。''。$ battle_get ['pic']。'width =height =border =0/>< / a> < / p> 
< p align =center>< span style =height:70px; text-align:center;>

我想要整个回声


解决方案

使用样式 float:left 图片放置为类似

 < div style =width:500 px> 
< ; div style =float:left; width:100 px>图片1< / div>
< div style =float:left; width:100 px>图片2< / div>
< div style =float:left; width:100 px>图片3< / div>

< div style =clear:both>< / div>
< / div>


I'm echoing out a few images which all works fine but my problem is they are all going down the page example

image 1

image 2

image 3

and I'd like to make them so they sit next to each other like so

image 1 image 2 image 3

and so on. I have tried to add inline into the CSS for my div tag but it does not work...

                                <div class="auction_box" style="height:150px">

                                <form name="myform" action="userbox.php" method="POST">
                                <p> </p>
                                <p> </p>
                                <p> </p>






    <p align="center"><a href="smalldex.php?name='.$battle_get['name'].'"?KeepThis=true&amp;TB_iframe=true&amp;height=400&amp;width=600" class="thickbox"><img src="http://pokemontoxic.net/img/pokemon/'.$v->type.''.$battle_get['pic'].'" width="" height="" border="0" /></a></p>
      <p align="center"><span style="height: 70px; text-align: center;">





                                    Name:<br/>' .$v->pokemon. '<br/>
                                    Level:' .$v->level. '<br/>
                                    Exp:' .$v->exp. '<br/>
                                    Gender:' .$v->gender. '<br/>
                                    Type:' .$v->type. '<br/>

    Slot you want to put your pokemon in


<select name="mydropdown">

<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>


<input type="hidden" name="myName" value="'.$v->id.'" />
                                <input type="submit" value="submit" name="submit"> 



                                </form>
                                </div>';

You can see that the div is called auction_box. I have tried a lot of things in CSS but has not worked... I'd like them all next to each other.

Has you can see the image is this part

   <p align="center"><a href="smalldex.php?name='.$battle_get['name'].'"?KeepThis=true&amp;TB_iframe=true&amp;height=400&amp;width=600" class="thickbox"><img src="http://pokemontoxic.net/img/pokemon/'.$v->type.''.$battle_get['pic'].'" width="" height="" border="0" /></a></p>
      <p align="center"><span style="height: 70px; text-align: center;">

I'd like the whole echo ( e.g the levels has well has the pic ) to be inline.

解决方案

Use style float:left to container where that images are placed like

<div style="width:500 px">
<div style="float:left; width:100 px">Image 1</div>
<div style="float:left; width:100 px">Image 2</div>
<div style="float:left; width:100 px">Image 3</div>

<div style="clear:both"></div>
</div>

这篇关于对齐我的图像,所以他们坐在彼此的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆