Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML
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.
 

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 29-Jan-13 20:51pm
Edited 29-Jan-13 22:30pm
v2
Comments
NaVeN Kumar at 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.
Sheikh Muhammad Haris at 30-Jan-13 22:02pm
   
try overflow: auto;

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 305
2 Richard MacCutchan 270
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,834
1 Sergey Alexandrovich Kryukov 7,477
2 DamithSL 5,689
3 Maciej Los 5,329
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411028.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100