Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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..
Posted
Comments
Vani Kulkarni 26-Feb-13 4:46am    
Enable scroll bar to the div which has gridview.
Nick Fisher (Consultant) 26-Feb-13 4:47am    
It would be better if you could actualy post the CSS code you've got for those DIVs so we can see where it's going wrong. Without the code to look at, the best I can suggest is to make sure you have the 'width' and 'height' attributes properly set for those containers, and try either setting the both the containers to 'float:left;' or 'display:inline;'.
Member 9644631 26-Feb-13 5:19am    
<div id="treeviewDiv" style="border-style: none ridge none none; border-width: 0% 0% 0% 0%; padding: 0% 5% 5% 1%; margin: 0% 5% 5% 1%; float:left; display:inline;min-width:25%; overflow:auto;
font-family: Arial, Helvetica, sans-serif; font-size: xx-small; font-style: normal; border-right-color: #000000; position: relative;">


<div id="reportDiv" style="padding: 1%; margin: 1%; float:left; text-align: center; position: relative; min-width:50%; display:inline;
font-family: Arial, Helvetica, sans-serif; font-size: xx-small; font-style: normal; overflow:auto; ">
Member 9644631 26-Feb-13 6:40am    
<div id="reportDiv" style="padding: 1%; margin: 1%; float:left; text-align: center; position: fixed; min-width:50%; display:inline;
font-family: Arial, Helvetica, sans-serif; font-size: xx-small; font-style: normal; overflow:auto; ">
It displayed properly.. However
Whenever i write display:inline and position:fixed together in style.. browsers scrolling functionality quits..

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

HTML
<div style="overflow:auto;">
<!-- gridview here -->
</div>
 
Share this answer
 
Hi,

Fix your div width to 50% each and give overflow:auto to show the scrollbar for the div.
HTML
<div id="div1" style="overflow:auto;width:50%">
</div>
<div id="div2" style="overflow:auto;width:50%">
</div>


Hope this helps.
 
Share this answer
 
v2
Comments
Member 9644631 26-Feb-13 5:18am    
Sorry.. This is not working
manognya kota 26-Feb-13 5:56am    
From your code i saw that you are using min width. did you check using width ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900