Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF2.0, Possibility to align Components in panelgrid

 
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: 18423
60
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;}
 
Shiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!