This is a migrated thread and some comments may be shown as answers.

Center Pager Content within pager div

1 Answer 675 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 02 Feb 2016, 09:52 PM

I'd like to modify the pager section to center the content. I've tried the usual CSS adjustments to center the content (margin-left & margin-right set to auto, text-align set to center), but no luck. Any ideas?

Thanks,

--Ed

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 04 Feb 2016, 02:33 PM
Hello Ed,

The pager has complex structure and it will be difficult to achieve the desired result, but you could use the following as a starting point:
<style>
  .k-grid-pager{
    background: none;
    text-align: center;   
  }
   
  .k-grid-pager>*{
    float: none!important;
  }
   
  .k-pager-numbers{
    position: static!important;
  }
  </style>

Another option is to change the pager DIV width to some fixed or percentage value and apply margin: 0 auto to it. With this approach you may also have to remove the background of the wrapping div.

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or