Sclass is not getting apply on listheader

asked 2016-02-12 12:21:34 +0800

Bhushanngage gravatar image Bhushanngage
59 6
<zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml"
    .bold {
    font-weight: bold;
<window title="listbox demo" border="normal" width="250px">
    <listbox id="box">
        <listhead sizable="true">
            <listheader id="listheaderA" label="name" sclass="bold" />
            <listheader label="gender" sort="auto" />
            <listcell label="Jane" />
            <listcell label="FEMALE" />
            <listcell label="Henry"  />
            <listcell label="MALE" />
                <label value="This is footer1" />
                <label value="This is footer2" />

In above code snippet, if I use sclass for listheader listheaderA then css class 'bold' is not applied to it. But if use zclass then it works.

In the documentation, it says

Since zclass is used to name the CSS classes associated DOM elements, all the default CSS rules won't be applied if zclass is assigned with a different value. Thus, it is used to custom a component with a totally different look.

So I don't want to use neither zclass nor inline css. How can I do this with sclass ? Any help is appreciated.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-12 15:03:21 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9

Try this :

    .bold .z-listheader-content {
    font-weight: bold;

like this you can append the bold style with sclass.


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

1 follower



Asked: 2016-02-12 12:21:34 +0800

Seen: 34 times

Last updated: Feb 12 '16

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