Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tab] Centered Tab #5589

Closed
rafalradomski opened this issue Jul 26, 2017 · 9 comments
Closed

[Tab] Centered Tab #5589

rafalradomski opened this issue Jul 26, 2017 · 9 comments

Comments

@rafalradomski
Copy link

rafalradomski commented Jul 26, 2017

Be default all tabs are on the left: https://semantic-ui.com/modules/tab.html

How I can achieve centered Tab like in Bootstrap 4 ?

There is no example of centered tab in Semantic doc

@awgv
Copy link
Member

awgv commented Jul 27, 2017

Hi @rafalradomski, it doesn’t exist. Would you like to request it?

@rafalradomski
Copy link
Author

@Banandrew I surprised no one asks about it before, it's common use case on centered pages

@vinayakkulkarni vinayakkulkarni changed the title Centered Tab [Tab] Centered Tab Jul 27, 2017
@stale
Copy link

stale bot commented Feb 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 23, 2018
@Atulin
Copy link

Atulin commented Mar 10, 2018

I'd rather it doesn't disappear in a pile of stale issues, so here's some activity from me: I'd also like to have a way to have my tabs centered.

@stale stale bot removed the stale label Mar 10, 2018
@franckpopchef
Copy link

Just ran in the same issue. Would be great if it is implemented.

@franckpopchef
Copy link

Quick CSS fix:
Add margin-left: auto to the first child of the menu and margin-right: auto to the last child.

Example:

.ui.secondary.pointing.menu a:first-child {
  margin-left: auto;
}

.ui.secondary.pointing.menu a:last-child {
  margin-right: auto;
}

Result:
Image of SUI Tabs Centered

@qGosha
Copy link

qGosha commented May 4, 2019

Was able to center menu in tab by adding style prop to menu shorthand:
<Tab menu={{ attached: true, tabular: true, style: { display: "flex", justifyContent: "center" } }} panes={panes} />

@lubber-de

This comment was marked as spam.

@peterdresslar
Copy link

peterdresslar commented Oct 18, 2019

Quick CSS fix:
Add margin-left: auto to the first child of the menu and margin-right: auto to the last child.

Example:

.ui.secondary.pointing.menu a:first-child {
  margin-left: auto;
}

.ui.secondary.pointing.menu a:last-child {
  margin-right: auto;
}

Result:
Image of SUI Tabs Centered

Worked for me (thanks @franckpopchef); here is a sandbox example:
https://codesandbox.io/s/semantic-ui-example-center-tabs-8deuf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants