0

How to center a Portal layout component in a div?

asked 2011-08-30 14:35:55 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Hi,

I'm trying to align a portal layout into a div which is my home page. I've already tried several aproaches like Borderlayout and Div, but without any success.
I would like to know if there is a way to put the Portal layout at the center of my screen.

Thanks,

Gyo

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2011-08-30 17:33:54 +0800

twiegand gravatar image twiegand
1807 3

Gyo,

One suggestion might be to try using the <hbox> component with the pack and align attributes.  Something like this:

<zk>
	<window height="100%" width="100%">
		<div height="100%" width="100%">
			<hbox width="100%" height="100%" pack="center" align="center">
				
				Portal layout code here
				
			</hbox>
		</div>
	</window>
</zk>

The above will center whatever is within the <hbox> both vertically and horizontally.  I do believe you have to set the height / width of the parent components for things to work correctly.

Maybe that will give you a starting point anyway...

Regards,

Todd

link publish delete flag offensive edit

answered 2011-09-01 08:18:09 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Thanks Todd,

Will try the suggested approach and then I let you know the results.

Gyo

link publish delete flag offensive edit

answered 2011-09-01 08:44:34 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Todd,

That worked fine! Thanks a lot! The simplest solutions sometimes are the hardest ones to figure out.

Cheers,

Gyo

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-08-30 14:35:55 +0800

Seen: 253 times

Last updated: Sep 01 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More