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
Issue with Centering Grid Column Captions #9077
Comments
Centering seems to work for me on http://demo.vaadin.com/sampler/#ui/grids-and-trees/grid/features when using the browser inspector to add this CSS:
Some things that you could check out for using the browser's DOM inspector:
|
Thanks for the info! I update the code to the following:
That still is not working. When I check the DOM, I am not seeing text-align-center added to the class for that element. I am able to center the contents of the cells in the footer and the grid itself, just not the header. Also, in that link you sent, the headers are showing up as left aligned. |
I used the browser's inspector to add Changing your code to set I'm suspecting that there's something in your application's theme that is interfering with the |
@Legioth - When I look in the inspector I do see the style that I added with a strike though: It seems like the styling in .v-grid-header is overriding what I am setting with text-align-center. How I can set my styling as higher precedence? I am calling setStyleName() on the header cell. Thanks, |
@szaluk Easiest way would be to add |
@knoobie - Adding !important worked. Thanks! I do think this should be investigated a bit. As a user I would expect that adding the same style to a HeaderCell as a FooterCell would result in the same behavior. |
Hello there! It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe. There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too! |
I am not able to center the Grid column captions. I have the following CSS:
.text-align-center { text-align: center; }
I am setting the style like so:
The caption is not centering. However, if I do the following in the footer, it does get centered:
Formatting text in a HeaderCell should work the same way as a FooterCell for consistency. I can't seem to get the caption in the Header to center at all.
The text was updated successfully, but these errors were encountered: