This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF h:outputText style attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF h:outputText style attribute" Watch "JSF h:outputText style attribute" New topic
Author

JSF h:outputText style attribute

prena bhatt
Greenhorn

Joined: Feb 05, 2008
Posts: 5
I have a <hutputText> tag in h:panelgrid with 3 columns.

All together i have 3 tags inside the h:panelGrid.

h:graphicImage, hutputText and a h:panelGroup.

Inside huputText i have some text. The problem is that i want that text to be centered and i put the style tag with attribute style = "text-align:center;

However it does not work. It just comes in one line and pushes the h:panelgroup all the way to the right side of the screen.

Can i fix the width of each column under h:panelgrid? or should i put the style attribute somewer else?

Thanks

Prena
Joe Matthew
Ranch Hand

Joined: Jun 10, 2008
Posts: 66
Yeah, this looks like an HTML align problem than a JSF one. The best way out of this is to start putting the borders on the page (HTML table borders). This way you will find out which table is creating this problem and solve it. This would mean restructuring the page maybe.


Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSF h:outputText style attribute
 
Similar Threads
Action method not getting called inside the dataTable
problem in using richfaces
jsf panelGrid
rich:contextMenu HOW TO RERENDER some sections!!
Ajax behavior/ Conditional rendering