0

Overriding CSS Styles

asked 2008-06-19 14:58:54 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5042097

By: ansancle

I have multiple listbox's in a zul page. By overriding the following (per the style guide) I can change the background and text colors for a listbox. The issue I have is that I have many lists on this page and only want this change to apply to one of them. If I use the code below in either my .css file or in a <style> block in the .zul it will cause all the lists to have this style.
Is there a way to have only the list I want get this style and be able to have the others look a different way?


div.cell-inner
{
background: #A3A3A3;
color:#FFFFFF;

}
div.listbox-body
{
background: #A3A3A3;
color:#FFFFFF;
}


delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2008-06-20 01:34:21 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5043126

By: waterbottle

You should set a sclass to your custom style class to listbox and add some style rule base on this style class following is the example :

<window title="listbox demo" border="normal"> <style> .mylist tr.item {
background: #A3A3A3;
color:#FFFFFF;

}
.mylist div.listbox-body
{
background: #A3A3A3;
color:#FFFFFF;
}

</style>
<vbox>
<listbox width="250px" sclass="listbox mylist">
<listhead sizable="true">
<listheader label="name" sort="auto"/>
<listheader label="gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
</listitem>
</listbox>
<listbox width="250px" >
<listhead sizable="true">
<listheader label="name" sort="auto"/>
<listheader label="gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
</listitem>
</listbox>
</vbox>
</window>


link publish delete flag offensive edit

answered 2008-06-20 12:10:15 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5043983

By: ansancle

Great, Thanks!
I was hunting around in some CSS docs trying to figure out exactly how to do what you showed.Works perfect.
Thanks again!!!
Andrew

link publish delete flag offensive edit

answered 2014-12-23 09:46:00 +0800

virat gravatar image virat
46 3

We are also facing same issue anyone can explain this

link publish delete flag offensive edit

answered 2014-12-23 10:21:38 +0800

millhouse gravatar image millhouse
1
http://www.bez-odsetek.pl...

thanks for this. its very usefull for me :)

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: 2008-06-19 14:58:54 +0800

Seen: 223 times

Last updated: Dec 23 '14

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