my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes DIV tag for vertical scrollbar causing blank space at the top of the DIV Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DIV tag for vertical scrollbar causing blank space at the top of the DIV" Watch "DIV tag for vertical scrollbar causing blank space at the top of the DIV" New topic
Author

DIV tag for vertical scrollbar causing blank space at the top of the DIV

Mike Thomson
Ranch Hand

Joined: Nov 07, 2007
Posts: 115

From main jsp page I am calling the "openNewWin()" javascript, which will open a new jsp page(sample.jsp).
sample.jsp has more fields and the page is little bit long. And I am using the <DIV> tag for the vertical scroll bar and it's working fine.
But the issue is, sample.jsp page has more fields and while submitting I am doing the validation and if any of the field is empty, I am the using alert message to correct it.
Whenver, alert message popup opens the entire content inside the <DIV> tag moves down and causing a huge blank space at the top.
If I scroll the page (not with vertical scrollbar, using the mouse and draging on the page down) I can able to see the DIV content along with the vertical scrollbar.
If I removed the DIV tag, even on the alert popup message on validation it's not moving down. So the issue is with the DIV.
PLease help to advice whether am I using the DIV tag correctly?
How to fix this issue? I am using IE 7.0 browser.




 
It is sorta covered in the JavaRanch Style Guide.
 
subject: DIV tag for vertical scrollbar causing blank space at the top of the DIV
 
Similar Threads
Fixed Table Header and changing classes
Scroll of div fail to work when table row inside it is higlighted
Table with Scrollbar
Display Tag css issues in IE and FF
Regarding Scrollable Table