How to align label's - sclass inline-block do not work

asked 2009-02-12 00:54:38 +0800

robertpic71 gravatar image robertpic71
1275 1

I want use label with a fix width (in pixels).
ZK < 3.0 no extra code
3.0 sclass="inline-box"
3.04 sclass="inline-block"
3.5 ??

<window title="My First Window" border="normal" width="200px">
   <label value="a" width="50px" sclass="inline-block" />
    <label value="longer" width="50px" sclass="inline-block"/>

The labels "a" and "longer" should have the same width. The textboxes should be aligned.
Of course, there is a grid or hbox - but sometimes it get's rough (grid in grid in grid...).

Here is an old thread.


delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-02-12 08:06:36 +0800

robbiecheng gravatar image robbiecheng
1144 2

Hi Robert,

<span>s are inline elements. You can only set width on block-level elements. You can try display:block.


link publish delete flag offensive edit

answered 2009-02-12 13:17:38 +0800

robertpic71 gravatar image robertpic71
1275 1

Thanks robbie,

display:block works


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




Asked: 2009-02-12 00:54:38 +0800

Seen: 332 times

Last updated: Feb 12 '09

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