-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone,
I'm migrating to ZK 3.5. Good work had been done with this new version! But I'm facing some problems with component style.
Changing button background-color
I'm trying to change the background-color of a button. I looked to the style guide but I have not found where this style is defined (and style guide for ZK 3.5 is not available). However, also in ZK 3.0.5 it's not specified where the background-color is defined.
See for ex. the following: http://www.zkoss.org/doc/styleguide/ch01s06.html
Here the style for font are defined, but nothing else...
The following is my example code:
<button label="My button" style="color:white; background-color:red"/>
With this code, the style attribute "color" works correctly (even not specified in style guide), but specifying "background-color" attribute, nothing changes.
Any solutions?
Changing listbox header font size
Another problem with listbox. I want to change the listbox header font-size, for ex. to 8pt. I have seen the style guide (see http://www.zkoss.org/doc/styleguide/ch01s21.html), and I tried with the following code:
<style>
div.z-listbox-head th{
font-size: 8pt;
}
div.z-head-cell-inner{
font-size: 8pt;
}
</style>
<listbox width="30%">
<listhead>
<listheader label="Name"/>
<listheader label="Surname"/>
</listhead>
<listitem>
<listcell label="Mickey"/>
<listcell label="Mouse"/>
</listitem>
</listbox>
I added prefix "z-" because I found this suggestion in forum:
http://www.zkoss.org/forum/index.zul#path%3DlistComment%3BdiscussionId%3D5647%3BcategoryId%3D14%3B
But again nothing changes.
Any suggestions?
Thanks in advance!
Emanuele
zk 3.5 change almost all css class ,and the document is out of date .. .||
you can change your button like this
<style> .z-button .z-button-tr,.z-button .z-button-tm,.z-button .z-button-tl, .z-button .z-button-cr,.z-button .z-button-cm,.z-button .z-button-cl, .z-button .z-button-br,.z-button .z-button-bm,.z-button .z-button-bl { color:white; background-image:none; background-color:red; } </style>
<style> div.z-list-header-cnt{ font-size: 8pt; } </style>
unforunatly, some components have complex html structures...
if you use setStyle , it will give the style to the outer html tag.
for example
<div style="style you set"> <div> <span> something you want to change</span> </div> </div>
Asked: 2008-09-25 08:24:46 +0800
Seen: 748 times
Last updated: Sep 25 '08