Click here to Skip to main content
13,595,475 members
Rate this:
Please Sign up or sign in to 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.

$(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");

html code
<div id="divContent" class="back" style="border: solid 3px gray; height: 500px; width: auto;overflow-x: scroll; overflow-y: visible;">
Posted 29-Jan-13 19:51pm
Updated 29-Jan-13 21:30pm
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.
Sheikh Muhammad Haris 30-Jan-13 22:02pm
try overflow: auto;

1 solution

Rate this: bad
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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02-2016 | 2.8.180621.3 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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