0

How to make horizontal grids go vertical?

asked 2015-11-09 08:50:39 +0800

dormitionskete gravatar image dormitionskete
5 1

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?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-11-09 09:53:20 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit
0

answered 2015-11-09 12:33:31 +0800

dormitionskete gravatar image dormitionskete
5 1

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

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2015-11-09 08:50:39 +0800

Seen: 31 times

Last updated: Nov 09 '15

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