scrollbar -URGENT

hi,
 I have a scroll bar that works when i put it for table .but now i need to put the whole form in a scrooll:

this is what i use:
<div style="overflow: auto; width: 800px; height: 400;  padding:2px; clear:all; margin: 0px">
...the form (very big)




</div>
BUt i am unable to get the scroollbar,the scrooll bar gets situated in between and not for the whole form.
For the example i have scroollbar
for:

username:
password:
..
.....

i were to make the height longer, it stays between here but not full,is it because i use other div also
thanks

Jasbir21Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gam3r_3xtr3m3Commented:
clearer explanation please.
0
Jasbir21Author Commented:
..hi,
  i need to have a form in a scroll bar, and i used this:

<div style="overflow: auto; width: 800px; height: 400;  padding:2px; clear:all; margin: 0px">
...the form (very big)




</div>
but i am unable, but if i were to use this same thing to put it for a table,meaning i can use this div... to put a table in a scroolbar but not a form, i think maybe theere is other div in the form , that 's why it is not.

pls help
0
Jasbir21Author Commented:
i mean - i need to put the whole form in a scrooll bar

thanks
0
seanpowellCommented:
Hi,

The div you're using is fine - we just need to make sure that your placing it correctly and using the right heights:

Let's look at the page below:

<html>
<head>
<title>Hello</title>
<style type="text/css">
<!--
form  {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 14px;
      color: #000000;
      }

input {
      width: 100px;
      }

label {
      float: left;
      width:100px;
      padding-left:30px;
      }
   
//-->
</style>
</head>
<body>
<div style="overflow: auto; width: 800px; height: 100px;  padding:2px; clear:all; margin: 0px">
<form>
<label for="username">Username:</label> <input type="text" name="username"><br />
<label for="password">Password:</label> <input type="text" name="password"><br />
<div style="width:100px; height:30px; float:left; padding:0px;"></div><span style="width:100px;">HouseNo1:</span> <input type="text" sixe="10" name="HouseNo1"><br />
<div style="width:204px; height:30px; float:left; clear:left;"></div><span style="width:100px;">HouseNo2:</span> <input type="text" sixe="10" name="HouseNo2"><br />
</form>
</div>
</body>
</html>

Notice that this div uses a height of 100px. The current height of the form example I've used is more than that, so you'll get a scrollbar. If you change the height of the div to 400px for example, the scrollbar will disappear because the div is now higher than the form.

Are you coding the page as per my example here, and the height you set for the div is less than the height of the form, and you're still not getting the scrollbar?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jasbir21Author Commented:
hi,
It was my fault, the div i did not put in right postion.
Thank you so much for being very helpful and patient with me.
Thanks and  God bless you.



0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.