Reputation: 1745
I have made a basic Tabs component following this documentation here.
Does anyone know the CSS to align ant-tabs-tab at the center?
I can see that there are different position placement however there isn't a top-center option.
Current CSS:
.ant-tabs-tab {
flex-grow: 1;
margin-right: 0px;
width: 80%;
text-align: center;
}
The output from the above CSS. I would like to keep the same size as the first image but have it center aligned. Not sure if this is possible but I thought I'd check first.
Upvotes: 6
Views: 7147
Reputation: 83
You have a property called centered in the Tabs component and all your TabPane will be centered.
<Tabs centered>
Upvotes: 8
Reputation: 53874
Do you mean like this?
.ant-tabs-nav-scroll {
display: flex;
justify-content: center;
}
Upvotes: 6