-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I want to have two grids 350px wide displayed horizontally when there is room to display them that way, but to flow vertical when there is not room.
How can I do that?
Hello dormitionskete,
A nice trick would be to use box as shown below:
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<box orient="horizontal">
<grid width="350px">
<columns>
<column label="A"/>
<column label="B"/>
</columns>
<rows>
<row>
</row>
</rows>
</grid>
<grid width="350px">
<columns>
<column label="C"/>
<column label="D"/>
</columns>
<rows>
<row>
</row>
</rows>
</grid>
</box>
</zk>
You just have to set the orientation based on the width of the page.
Best Regards,
Darksu
Thank you very much for your help.
Actually, what I just discovered, after years of wrestling with this on and off, was to wrap them in a div element, and to put style="float:left;" in the first grid, like this:
<div>
<grid width="350px" style="float:left;">
<columns>
<column label="A"/>
<column label="B"/>
</columns>
<rows>
<row>
</row>
</rows>
</grid>
<grid width="350px">
<columns>
<column label="C"/>
<column label="D"/>
</columns>
<rows>
<row>
</row>
</rows>
</grid>
</div>
But I do greatly appreciate your help, and I hope you have a wonderful day.
Best regards,
Nico
Asked: 2015-11-09 08:50:39 +0800
Seen: 32 times
Last updated: Nov 09 '15