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

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%">
<label value="Hello world" />
</hbox>
<hbox width="100%" widths="20%,80%">
<label value="Hello world" />
</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 retag edit

## 2 Replies

jumperchen
3909 2 8
http://jumperchen.blogspo...

Hi,

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

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

[hide preview]