PDA

View Full Version : Virtual pagination losing pagebox placement control in IE



Strangeplant
06-08-2007, 03:46 PM
1) Script Title: Virtual Pagination

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm

3) Describe problem: Using Flatview, and it generates the page numbers in the little boxes just fine, but in IE, when there are more than 3 pages, the next box(s) shift to a line below the rest. I haven't found anything in the style sheets that will change how the containing div behaves. Of course, it works perfectly in FF.

Now, if I try to insert the alternate array for textbox links, it won't work in either browser, and I can't find any reason for that, but I can live without it for a while, but sure would be good to fix this at the same time. And yes, it works on your demo page. The only thing unusual is that I have an onload function that starts the lightbox, virtual page, and hvmenu:
<script language="JavaScript1.2">
function _begin() {
var pagecontent=new virtualpaginate("virtualpage", 1)
pagecontent.buildpagination("paginatediv")
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", initLightbox, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", initLightbox );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
initLightbox();
};
}
else
window.onload = initLightbox;
}
Go()
}
</script>(Many thanks to J. Schurer for this in a previous post.)

ddadmin
06-08-2007, 05:56 PM
Assuming you've kept the same CSS class names used by default by the script, the DIV that houses the pagination links is affected by this CSS definition:


.paginationstyle{ /*Style for demo pagination divs*/
width: 250px;
text-align: center;
padding: 2px 0;
margin: 10px 0;
}

Generally what you described is due to the pagination DIV being too small to display all the pagination links on one line. Change the code in red above to something wider, such as 400px.