As Jeff said, CSS is way to go in most cases.  One thing to note, in the
example on that webpage, they set the content #content style class to
have a fixed width of 500 pix.  If you wish to play around more, such as
having a center column that can expand depending on the browser window
size/resolution, take a look at 3-column layouts using faux columns in
CSS.  It is essentially the same as what you are doing here, but you can
use percentages on the left and right columns to allow for a liquid
layout.

If you are able to, I highly recommend using the Firebug or Web
Developer plugins for Firefox, as they allow you to "inspect" individual
elements on the page by mousing over them, and you can see the
corresponding CSS.  For JSF, CSS will take care of a lot of heartache
with respect to positioning and style.  

There's tons of sites with templates for this, a couple I like are
www.mollio.org and http://www.glish.com/css/.  Good luck!

Tim

-----Original Message-----
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 17, 2007 11:32 AM
To: MyFaces Discussion
Subject: Re: how to force a jsf page to be shown in horizontal center of
browser?

Legolas,

This is a CSS issue (or maybe Tobago), not JSF. But this page should 
help you, as it did for me. See [1]

[1] http://www.bluerobot.com/web/css/center1.html

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

legolas wrote:
> Hi
> Thank you for reading my post.
> i have some jfs pages (XML format) which contain several page
fragments.
> 
> When i run the application , for example index page opens , but its
content
> are shown in left side of browser, i want them to be shown in
horizontal
> center of browse.
> Imagine that my page size is 800*1000, so when some on with a
resolution
> like 1024*768 view mypage he/she will see some free space in right
side of
> his/her browser.
> 
> I want my content to be in center of the browser and not in left side,
is
> there any way for this?
> 
> thanks


Reply via email to