0

Images do not take heed of the containing box' widths attribute

asked 2010-06-30 05:48:13 +0800

cvarona gravatar image cvarona
554 1 6

Hi there,

just a simple example anyone can try on the online demo

<zk>
   <window width="100px">
    <hbox width="100%" widths="80%,20%">
        <image src="/img/Centigrade-Widget-Icons/Globe-128x128.png"/>
        <label value="Hello world" />
    </hbox>
    <hbox width="100%" widths="20%,80%">
        <label value="Hello world" />
        <image src="/img/Centigrade-Widget-Icons/Globe-128x128.png"/>
    </hbox>
</window>
</zk>

In other words: when the source image does not fit into the space mandated by the containing box widhts attribute it just protrudes into the space reserved for the next siblings.

Any idea as to how to overcome this?

César Varona

delete flag offensive retag edit

2 Replies

Sort by » oldest newest

answered 2010-07-06 22:35:11 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi,

You can try to specify the width of the image to be 100%.

link publish delete flag offensive edit

answered 2010-07-08 03:26:45 +0800

cvarona gravatar image cvarona
554 1 6

Hi,

it works, although it's a bit strange that width=100% has a different meaning on images ("render it wholly, rescaling it if necessary") than on any other component ("make it fill up all the space assigned to it", as I guess).

Kind regards

César Varona

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: 2010-06-30 05:48:13 +0800

Seen: 172 times

Last updated: Jul 08 '10

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