improve css and script for pagination