使用div将网页划分为2个垂直部分 [英] Divide web page in 2 vertical parts using div

查看:100
本文介绍了使用div将网页划分为2个垂直部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用div标签..

一个div由treeview和其他包含gridview组成..

当gridview中的列数较少时,它可以正常工作。 。

但是当列数增加时,包含gridview的div被加载到包含树视图的div下面..

但是我想加载它除了它。

那么怎么做..

解决方案

启用滚动条到具有gridview的div。见下文:



 <   div     style   = 溢出:自动; >  
<! - gridview here - > ;
< / div >






修复你的div每个宽度为50%并给出溢出:auto来显示div的滚动条。

 <   div     id   =  div1    style   = 溢出:自动;宽度:50% >  
< / div >
< div id = div2 style = overflow:auto; width:50% >
< / div >





希望这会有所帮助。

I have to div tags..
One div consists of treeview and other contains gridview..
When the number of columns in gridview is less it works fine..
But when the number of columns increases the div containing the gridview is loaded below the div containing the treeview..
But i want to load that besides it.
So how to do it..

解决方案

Enable scrollbar to the div which has gridview. See below:

<div style="overflow:auto;">
<!-- gridview here -->
</div>


Hi,

Fix your div width to 50% each and give overflow:auto to show the scrollbar for the div.

<div id="div1" style="overflow:auto;width:50%">
</div>
<div id="div2" style="overflow:auto;width:50%">
</div>



Hope this helps.


这篇关于使用div将网页划分为2个垂直部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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