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

text-center Does Not Affect Table Header #16146

Closed
zengshengliu opened this issue Mar 24, 2015 · 2 comments
Closed

text-center Does Not Affect Table Header #16146

zengshengliu opened this issue Mar 24, 2015 · 2 comments
Labels

Comments

@zengshengliu
Copy link

In the following example, text-center does not affect the table header. The text in table body is displayed normally (center aligned) but not the header
<table class="table table-condensed table-hover text-center">
<thead>
<tr>
<th class="text-center">Room Id</th>
</tr>
</thead>

@juthilo juthilo added the css label Mar 24, 2015
@juthilo
Copy link
Collaborator

juthilo commented Mar 24, 2015

We set th { text-center: left; }, which is more specific than the class on the parent <table> and thus prevents the header cell from inheriting the centering styles. Putting the .text-center class directly on the <th> should work though (confirmed in the docs).

As our documentation for the text alignment classes shows them being used on paragraphs and doesn't claim compatibility with tables, I'd recommend using custom CSS to override Bootstrap's table header styles instead of using alignment classes in this situation.

/cc @mdo to confirm or deny

@zengshengliu
Copy link
Author

Ok thanks

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

No branches or pull requests

2 participants