paginate css and fix bugs