0

Background image of button component

asked 2012-03-27 13:45:52 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Hi

I want to override the default background of the button, Here is the code
[code<?page title="Auto Generated index.zul"?>
<zk>
<style>
.z-button .z-button-cm {
background-image:url('/img/Bubble.png'); }
</style>

<window title="Hello World!!" border="normal" width="200px">
<button label="click" onClick="" mold="trendy" />
</window>
</zk>


But nothing is changing when we run.

Please help me.

delete flag offensive retag edit

4 Replies

Sort by » oldest newest

answered 2012-03-27 15:20:19 +0800

twiegand gravatar image twiegand
1807 3

updated 2012-03-27 15:21:21 +0800

Senthilchettyin.

By modifying your CSS background-image to a known url such as:

<style>
	.z-button .z-button-cm {
		background-image:url('http://www.zkoss.org/zksandbox/img/network.gif'); 
	}
</style>

your code then works.  

This indicates that the path you are using is incorrect.

Hope that helps,

Todd

link publish delete flag offensive edit

answered 2012-03-27 16:35:02 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Yes it works
But why label ("click") is not visible

link publish delete flag offensive edit

answered 2012-03-27 17:18:40 +0800

twiegand gravatar image twiegand
1807 3

Senthilchettyin,

The label is actually there, just hard to read because of my poor choice of images (and the fact that the images repeat along the X axis).

To prove it, change your <button> tag to look like this:

<button label="click" onClick="" mold="trendy" style="font-weight:bold;font-size:1em; color:red;"/>

Regards,

Todd

link publish delete flag offensive edit

answered 2012-03-28 03:41:21 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Thank you Sooooooooooooooooooooo much. I really appreciate for helping new comers

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: 2012-03-27 13:45:52 +0800

Seen: 154 times

Last updated: Mar 28 '12

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