Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JSF2.0, Possibility to align Components in panelgrid

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 24283
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;}
 
reply
    Bookmark Topic Watch Topic
  • New Topic