• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF2.0, Possibility to align Components in panelgrid  RSS feed

 
Joerg Orlowski
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i just try JSF2 and have a little Problem.
I want to make a box/table with this layout:

A1 A2
B1 B2
C1

I use grdipanels and my question ist how can i align a component (commandbutton) C1 horizontally??
I solved it with css positioning left:110px, but this is not very dynamic.

Any suggestions?

Thanks

Jörg Orlowski
 
Tim Holloway
Bartender
Posts: 18663
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Joerg!

Actually, I think our editor repositioned your example. You'll have better luck if you do your "ASCII Art" using the editor's Code button.

CSS is supposed to handle layour details in JSF. There are a number of CSS options that can help, although some are sensitive to the browser, browser version, and DOCTYPE options of the page.

For a truly dynamic layout, I think you can use EL in the JSF tag's "style=" attribute and provide the necessary CSS information as computed in a backing bean, but normally such extreme measures aren't needed.
 
ali esmaily
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use this code.


.testCol1 { background-color: #3366ff;}
.testCol2{vertical-align: top; background-color: #66ff66;}
.testCol3{ background-color: #66ff66;}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!