[英]image and radio button alignment issue in css and html
i am currently using this code: 我目前正在使用此代码:
<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
it is giving me solution like http://i.stack.imgur.com/ppjjF.png but i want it to be like this http://i.stack.imgur.com/sIDX1.png 它给了我像http://i.stack.imgur.com/ppjjF.png这样的解决方案,但我希望它像这样http://i.stack.imgur.com/sIDX1.png
i am trying it since last few hours but i cant find any solution. 自最近几个小时以来,我一直在尝试,但我找不到任何解决方案。 kindly help me
请帮助我
Use this 用这个
<style type="text/css">
.auto-style1 {
text-align: center;
display:inline-block
}
</style>
<div class="auto-style1" style="width: 200px; height: 300px; float: left">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px;">
<input align="middle" name="venue" type="radio" ></div>
<div class="auto-style1" style="width: 200px; height: 300px; float: left">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px; float: left">
<input align="middle" name="venue" type="radio" ></div>
<div class="auto-style1" style="width: 200px; height: 300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px; float: left">
<input align="middle" name="venue" type="radio" ></div>
try something like this 尝试这样的事情
<div style="width:200px; height:300px; float:left; padding:0px 10px;" align="center">
<img src="test.png" style="width:200px; height:200px;" /> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px; float:left; padding:0px 10px;" align="center">
<img src="test.png" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px; float:left; padding:0px 10px;" align="center">
<img src="test.png" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
Check Jsfiddle output : http://jsfiddle.net/8ZJP5/ 检查Jsfiddle输出 : http : //jsfiddle.net/8ZJP5/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.