-
FEATURED COMPONENTS
First time here? Check out the FAQ!
In list box when multiple and checkmark set to true, if a label in list cell has style "float: left;", the checkmark will move to the right side of label. Is this a bug?
The following code can reproduce the problem, see the first checkbox is not aligned with the rest.
<zk>
<window title="listbox demo" border="normal" width="250px">
<listbox id="box" checkmark="true" multiple="true">
<listhead sizable="true">
<listheader label="name" sort="auto" ></listheader>
<listheader label="gender" sort="auto" ></listheader>
</listhead>
<listitem>
<listcell>
<label value = "Mary" style="float: left;"></label>
</listcell>
<listcell label="FEMALE" ></listcell>
</listitem>
<listitem>
<listcell label="John" ></listcell>
<listcell label="MALE" ></listcell>
</listitem>
<listitem>
<listcell label="Jane" ></listcell>
<listcell label="FEMALE" ></listcell>
</listitem>
<listitem>
<listcell label="Henry" ></listcell>
<listcell label="MALE" ></listcell>
</listitem>
</listbox>
</window>
</zk>
Thanks,
Bing
Hi
Please try the following code:
<label value = "Mary" style="float:left; display:inline-block">
Hi matthewgo,
Thank you for the code. But I tried with adding "display:inline-block" to the style, it's still not working.
The reason I specify float as left for the label is because in order to reused the code, I shared the same style for labels when attached to different parent components, some need this style to default to left.
Bing
Asked: 2011-12-05 16:05:55 +0800
Seen: 304 times
Last updated: Dec 07 '11