Reputation: 1
I need to know how to scroll a button on page scroll.
I have some 200 table data where I can select anyone of them, and then I can submit it to a database. The problem is, if I select the 1st row of table data I need to travel toward the bottom of the table to bring the submit button into view. I am planning to make the button scroll with the page, can anyone help me achieve this?
Upvotes: 0
Views: 1359
Reputation: 52648
Istead of using javascript or position:absolute css, consider adding one button/link to each row, called "Choose this row" or similar.
Upvotes: 0
Reputation: 14049
Didnt get your question right. Did you mean that the submit button should be stationary irrespective of the page scroll. if it's so, add 'position: absolute' style to the button and add 'top', 'left' values to the css.
Upvotes: 0
Reputation: 86406
The better solution is make your table scrollable
put the whole data inside the <div>
and make it scrollable and put the submit button outside this div.
something like:-
<div style="height:500px;overflow:auto">
//All rows here
</div>
<input type="submit">
Thanks.
Upvotes: 1