| Author |
JSF2.0, Possibility to align Components in panelgrid
|
Joerg Orlowski
Greenhorn
Joined: Mar 08, 2010
Posts: 2
|
|
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
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14460
|
|
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.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
ali esmaily
Greenhorn
Joined: Apr 13, 2011
Posts: 2
|
|
you can use this code.
.testCol1 { background-color: #3366ff;}
.testCol2{vertical-align: top; background-color: #66ff66;}
.testCol3{ background-color: #66ff66;}
|
 |
 |
|
|
subject: JSF2.0, Possibility to align Components in panelgrid
|
|
|