Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

text-align in h:dataTable  RSS feed

 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a data table with four columns. By default, the text of each column of the table is left aligned.

I am trying to make the text of certain columns of the table to be 'centered'. And I tried to use the columnClasses in the dataTable tag to do it but failed (i.e. all text is still left aligned.). Maybe someone could help me in spotting the mistake that I made.

My JSP:


I swear that I can access the stylesheet MilPDS_Style.css because the rest of the specifications in the stylesheet get picked up successfully. And my MilPDS_Style.css has:
 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me answer my own question.

Add width of the column and "nowrap: true;" for that column in the stylesheet solve the problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!