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

Tabstrip Tab Alignment

3 Answers 772 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christy
Top achievements
Rank 1
Christy asked on 02 Apr 2018, 06:52 PM

Our client has a request to center-align the tabs on the tabstrip. We currently have them over to the left, and I can see how to use rtl to move them over to the right. Is there a way to move them to the center? We would need the tab content to be to the LEFT and right of each tab as shown in the attached file.

Thanks!

Christy

3 Answers, 1 is accepted

Sort by
0
Christy
Top achievements
Rank 1
answered on 02 Apr 2018, 06:53 PM
Not sure why the attachment did not come through. 
0
Christy
Top achievements
Rank 1
answered on 03 Apr 2018, 04:57 PM

Found a way to do this:

.k-tabstrip.k-header > ul.k-reset {
  padding-left: 50px;
}
0
Dimiter Topalov
Telerik team
answered on 04 Apr 2018, 11:26 AM
Hello Christy,

Thank you for sharing the working approach with the community. While it is perfectly valid, you can also utilize CSS flex to make this more generic and the list items to be centered regardless of the exact width of the viewport:

>>> .k-tabstrip.k-header > ul.k-reset {
          display: flex;
          justify-content: center;
          width: 100%;
        }
         
        >>> .k-tabstrip.k-header > ul.k-reset > li {
          flex: 0 1 auto;
        }

https://plnkr.co/edit/d5cclLUzNtdTTgFowKLN?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Christy
Top achievements
Rank 1
Answers by
Christy
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or