I apologize if this is a duplicate! Couldn't find anything related.

The 'align' setting in table settings doesn't seem to apply the views-align-center class to column headings (th elements).

Comments

dawehner’s picture

If the align setting does not work for you, it's probably "blocked" by custom css. For these use cases views can't do something for you, but you have to use your own css. That's life :)

If it's a bug it is somehow required that you show us your site.

fenda’s picture

I'm running views on a fresh install of D7 with bartik theme. Looked in firebug and there is no css overwriting.
The issue is that the .views-align-center class is not even being applied to the th element.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new2.62 KB

It works for me without problems in bartik. I checked left, center and right for that.

Here is an export of the view i used to reproduce it.

fenda’s picture

StatusFileSize
new20.83 KB
new3.53 KB

Very odd. Please see my attached view export and screenshot.

dawehner’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new608 bytes

Oh i'm sorry, i didn't stored the word "header" in my brain.

Here is a patch which adds the align css class to the header as well. It would be cool if you could test it and report whether it works.

fenda’s picture

Status: Needs review » Reviewed & tested by the community

Yes, this patch worked perfectly.

tim.plunkett’s picture

#5++

dawehner’s picture

Version: 7.x-3.3 » 6.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Just committed this patch to 7.x-3.x

Thanks!

darrellduane’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new2.69 KB

Here is a patch for the 6.x-3.x-dev version. I had to backport the drupal_clean_css_identifier() function from Drupal 7. It works well for me, my tables are a lot easier to read now.

chris matthews’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue