⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

How to right align some column title



mbanolas
  • profile picture
  • Member

Posted 17 October 2015 - 17:25 PM

I am able to align a specific column using this code in the controller

$this->grocery_crud->callback_column('field_name',array($this,'_column_right_align'));

and the callback function

function _column_right_align($value, $row) 
        {
        return "<span style='width:100%;text-align:right;display:block;'>$value</span>";
        }

 

but the column title is not aligned.

How can I align the title?

Thanks

 


dodoananto
  • profile picture
  • Member

Posted 08 July 2016 - 11:17 AM

hi mbanolas,

 

please try this ::

 

$crud->display_as("jml_tran", "<span style='width: 100%; text-align: right; display: block;'>Jumlah</span>");
 
thanks