Reputation: 10404
The header in Magento's grid is aligned to left by default. You can easily change the align in cell by adding 'align' parameter to column definition.
But how can I change the align of header on Adminhtml Grid?
Upvotes: 0
Views: 1873
Reputation: 15216
Just add this to the column definition.
'header_css_class'=>'a-center'
So your column can look like this:
$this->addColumn('some_column', array(
'header' => Mage::helper('some_helper')->__('Header title'),
'index' => 'some_column',
'header_css_class'=>'a-center'
));
The header_css_class
parameter allows you to set a class to the grid header and a-center
is the admin class for text-align:center
.
Off topic but maybe you need it:
column_css_class
allows you to add a class to the columns that hold values.
Upvotes: 4