Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

how to set the horizontal scroll while i click add new column button it dynamically add the n number of columns. i also used the overflow-x: scroll,overflow-y:hidden but not working .please any one help me. thanks for your reply.


XML
script
$(document).ready(function() {
var id = 1;
$("#aBAddClnBtn").click(function() {
var newdiv = "<div id=divColumn" + id + " style='border:solid 1px gray; width:15%;'><div id=divHeader" + id + " style='border: solid 1px gray; height: 50px;'>&nbsp;</div> <div id=divData" + id + "  style='border: solid 1px gray; height: 445px;'>&nbsp;</div></div>";
 $(newdiv).css("float", "left").appendTo("#divContent");
  id++;
});
});

html code
<div id="divContent" class="back" style="border: solid 3px gray; height: 500px; width: auto;overflow-x: scroll; overflow-y: visible;">
</div>
Posted
Updated 29-Jan-13 21:30pm
v2
Comments
NaVeN Kumar 30-Jan-13 5:12am    
Hi Keerthana,
Any scroll bar comes only when it overflow rigtht may be your content is not overflowed. Try to reduce height and see if you want to test.
[no name] 30-Jan-13 22:02pm    
try overflow: auto;

1 solution

Use Panel insted of div

here you get options

<asp:panel id="Test" runat="server" scrollbars="" xmlns:asp="#unknown">

In ScrollBars you have options


Use those
 
Share this answer
 

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