html 的div,想要两个并列。但却一直换行 ,求大神指点
<divid="container"style="width:1100px"><divid="left"style="height:20px;width:800px;fl...
<div id="container" style="width:1100px">
<div id="left" style="height:20px;width:800px;float:left;">
<label for="channelName">通路结构</label>
<input name="channelName" type="text" value="${channel.name}" id="channelName" size="50" disabled="disabled" />
<input type="button" value="选择" onclick="chooseChannelByType('4,5,6,7,8,9,91,10,11,20', 'false');"/>
<input type="hidden"" name="includeSubChannel" id="includeSubChannel" value="1" />
</div>
<div style="clear:both"></div>
<div id="right" style="height:20px;width:800px;float:left;">
<span class="amountVerify" style="margin-right:10px; font-size: 15px;font-weight: bold;" >余额校验</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="verify" value="1" onclick="accordShow();"><span class="amountVerify" >是</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="noVerify" value="2" checked="checked" onclick="accordShow();"/><span class="amountVerify" >否</span>
</div>
</div>
</script>
<style type="text/css">
div#container{width:1100px;height:30px;}
div#menu {height:30px;width:800px;float:left;}
div#content {height:30px;width:300px;float:left;}
</style> 展开
<div id="left" style="height:20px;width:800px;float:left;">
<label for="channelName">通路结构</label>
<input name="channelName" type="text" value="${channel.name}" id="channelName" size="50" disabled="disabled" />
<input type="button" value="选择" onclick="chooseChannelByType('4,5,6,7,8,9,91,10,11,20', 'false');"/>
<input type="hidden"" name="includeSubChannel" id="includeSubChannel" value="1" />
</div>
<div style="clear:both"></div>
<div id="right" style="height:20px;width:800px;float:left;">
<span class="amountVerify" style="margin-right:10px; font-size: 15px;font-weight: bold;" >余额校验</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="verify" value="1" onclick="accordShow();"><span class="amountVerify" >是</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="noVerify" value="2" checked="checked" onclick="accordShow();"/><span class="amountVerify" >否</span>
</div>
</div>
</script>
<style type="text/css">
div#container{width:1100px;height:30px;}
div#menu {height:30px;width:800px;float:left;}
div#content {height:30px;width:300px;float:left;}
</style> 展开
2个回答
展开全部
你的div总宽度才1100px,两列各有800px,一行明显装不下啊。第二列应该居右。
<div id="container" style="width:1100px">
<div id="left" style="height:20px;width:800px;float:left;">
<label for="channelName">通路结构</label>
<input name="channelName" type="text" value="${channel.name}" id="channelName" size="50" disabled="disabled" />
<input type="button" value="选择" onclick="chooseChannelByType('4,5,6,7,8,9,91,10,11,20', 'false');"/>
<input type="hidden"" name="includeSubChannel" id="includeSubChannel" value="1" />
</div>
<div id="right" style="height:20px;width:200px;float:right;">
<span class="amountVerify" style="margin-right:10px; font-size: 15px;font-weight: bold;" >余额校验</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="verify" value="1" onclick="accordShow();"><span class="amountVerify" >是</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="noVerify" value="2" checked="checked" onclick="accordShow();"/><span class="amountVerify" >否</span>
</div>
</div>
2017-05-19
展开全部
<!--container width改大点 里边2个800的div 它至少要1600以上-->
<div id="container" style="width:1800px;">
<div id="left" style="height:20px;width:800px;float:left;">
<label for="channelName">通路结构</label>
<input name="channelName" type="text" value="${channel.name}" id="channelName" size="50" disabled="disabled" />
<input type="button" value="选择" onclick="chooseChannelByType('4,5,6,7,8,9,91,10,11,20', 'false');"/>
<input type="hidden"" name="includeSubChannel" id="includeSubChannel" value="1" />
</div>
<div id="right" style="height:20px;width:800px;float:left;">
<span class="amountVerify" style="margin-right:10px; font-size: 15px;font-weight: bold;" >余额校验</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="verify" value="1" onclick="accordShow();"><span class="amountVerify" >是</span>
<input class="amountVerify" type="radio" name="balanceVerify" id="noVerify" value="2" checked="checked" onclick="accordShow();"/><span class="amountVerify" >否</span>
</div>
<!--清除浮动放在两个div下边-->
<div style="clear:both"></div>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询