3

I have the same exact problem as related here

Calculated Column left align header

However, the solution suggested is inadequate. This would require me to manual add the web part to each list that I create. (I'm sure you can see why this is horrible)

Is there another way to attain this by maintaining the Number type output?

2 Answers2

0

I did it this way with jquery...

$(document).ready(function(){
    $('.class name here:contains(text in the header))').html('<div style="width:100%; text-align:left;">text for the column header</div>');
});

alignment now on the left.

Phil
  • 1
0

You could do something like this:

keeping the Number format, edit your formula to output something like:

="<span class='fixMyHead'>" & [Some field] "</span>"

Then, using jQuery:

$('.fixMyHead').each(function(){  
    $td = $(this).parents('td:first');   
    $td.closest('table').find('th').eq($td.index()).find('.ms-numHeader').css('text-align', 'left');
    $td.children(':first').css('text-align', 'left');
});
MdMazzotti
  • 4,787
  • 3
  • 17
  • 35