diff --git a/jquery.onepage-scroll.js b/jquery.onepage-scroll.js
index 71c75ba..6d3a031 100644
--- a/jquery.onepage-scroll.js
+++ b/jquery.onepage-scroll.js
@@ -319,8 +319,13 @@
// Create Pagination and Display Them
if (settings.pagination == true) {
- if ($('ul.onepage-pagination').length < 1) $("
").prependTo("body");
+ if ($('ul.onepage-pagination').length < 1){
+ var ul_height = sections.length * 24;
+ $("").prependTo("body");
+ $(".onepage-pagination").css("height", ul_height + "px");
+ }
+
if( settings.direction == 'horizontal' ) {
posLeft = (el.find(".onepage-pagination").width() / 2) * -1;
el.find(".onepage-pagination").css("margin-left", posLeft);
diff --git a/onepage-scroll.css b/onepage-scroll.css
index 3d4415f..2f10d63 100644
--- a/onepage-scroll.css
+++ b/onepage-scroll.css
@@ -31,10 +31,11 @@ body, .onepage-wrapper, html {
.onepage-pagination {
position: absolute;
right: 10px;
- top: 50%;
+ top: 0;
+ bottom: 0;
z-index: 5;
list-style: none;
- margin: 0;
+ margin: auto 0;
padding: 0;
}
.onepage-pagination li {