-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi to all,
This is an issue i had with all ZK versions and i am trying to ignore it. Suppose you want to render the following simple page header:
As you see the button refresh is aligned to the right side. The code for this is as simple as the following snippet:
<div vflex="1" hflex="1">
<hlayout valign="middle">
<div hflex="1">
<n:h4>
Page Title
</n:h4>
</div>
<button label="Refresh" sclass="btn btn-warning" iconSclass="z-icon-refresh" />
</hlayout>
</div>
The problem is that it doesn't work always well. If you try to open this page in Chrome for example, you will notice that the "refresh" button is not aligned always correctly. Pressing F5 or CR to reload the page does not have the same behavior. Usually if you press CR in the browser's address bar will load the page correctly.
It doesn't look as a big problem, but if you have quite a few widgets docked on the right side, the last one goes off the screen.
Are you aware of this or any related open ticket?
Thanks
Costas
In my experience, the behaviour you describe comes from the <hlayout> when combined with many hflex.
You should consider a css approach such as the following (quick improvable example):
<div vflex="1" hflex="1">
<div style="float: left;">Page Title</div>
<button label="Refresh" sclass="btn btn-warning" iconSclass="z-icon-refresh" style="float: right;"/>
</div>
Hope it helps. Gio
Asked: 2015-11-26 13:35:36 +0800
Seen: 34 times
Last updated: Nov 26 '15