0

Custom style doesn't apply in zk ee

asked 2014-12-05 09:18:10 +0800

fmannelli gravatar image fmannelli
1

How can I apply style defined in custom file style.css to my zul with ZK EE?

I use in my index.zul page but doesn't works!

Thanks a lot in in advance

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2014-12-05 14:42:54 +0800

bbolek gravatar image bbolek
98 1 5

You can try this:

<?link href="resources/css/custom.css" rel="stylesheet" type="text/css"?>
link publish delete flag offensive edit

answered 2014-12-06 09:23:40 +0800

fmannelli gravatar image fmannelli
1

Thanks bbolek for your answer, but I put Other hints?

link publish delete flag offensive edit

answered 2014-12-06 21:50:10 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2014-12-06 21:50:38 +0800

A second way is to tell ZK where additionally CSS files are placed that should automatically created in each page at render time. The effect is the same as bbolek describes.

zk.xml

. . .
<!-- ====================================================== -->
<!-- Path to the character set and sizes -->
<!-- Zkoss configuration file -->
<!-- Custom components and CSS files are declared here -->
<!-- ====================================================== -->
<language-config>
   <addon-uri>/WEB-INF/lang-addon.xml</addon-uri>
</language-config>
. . .

lang-addon.xml

. . .
   <stylesheet href="/resources/css/custom.css" type="text/css" />
. . .

best Stephan

link publish delete flag offensive edit

answered 2014-12-08 00:48:03 +0800

cor3000 gravatar image cor3000
6280 2 7

@fmannelli: Please show us what you are trying, as done correctly the suggested approaches work. Maybe we can spot a tiny error in your implementation.

Robert

link publish delete flag offensive edit

answered 2014-12-09 08:27:09 +0800

fmannelli gravatar image fmannelli
1

This is part of my style.css file :

... /* Start: Model window ---------------------------------------------- */ .mymodal .z-window-modal-hm, .mymodal .z-window-modal-br, .mymodal .z-window-modal-cr, .mymodal .z-window-modal-cl, .mymodal .z-window-modal-hr, .mymodal .z-window-modal-tr, .mymodal .z-window-modal-hl { background-image: none; background-color: #00324b; }

.mymodal .z-window-modal-icon { width: 20px; height: 16px; border-width: 1px; border-style: solid; border-color: #00324b #00324b #00324b #00324b; box-shadow: inset 0 1px 0 #00324b, inset -1px -1px 0 #00324b, inset -1px -2px 0 #00324b; }

.mymodal .z-window-modal-close { background: url('/imgs/close.jpg') transparent no-repeat 0 0; }

.mymodal .z-window-modal-header,.mymodal .z-window-modal-header-noborder { padding-top: 1px; padding-right: -1px; padding-bottom: 1px; padding-left: 0; margin-right: -4px; color: white; font-family: "Tahoma", verdana, arial, sans-serif, times; font-size: 18px; font-weight: bolder; }

.link{ color:blue; cursor: pointer; }

.mylist .z-listitem-seld { background-image:none; background-color:lightGray; }

.mylist .z-listbox { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #CFCFCF; overflow: hidden; } /* Header and Footer Font and Height */ .mylist .z-listfooter-cnt, .mylist .z-listheader-cnt { border: 0 none; color: black; font-family: "Tahoma", verdana, arial, sans-serif; font-size: 11px; margin: 0; height: 18px; }

/* Cell Height and Font */ .mylist .z-listfooter-cnt, .mylist .z-listcell-cnt, .mylist .z-listheader-cnt { font-size: 11px; font-family: "Tahoma", verdana, arial, sans-serif; height: 18px; }
...

I use this directive in my index.zul page : ?link href="style.css" rel="stylesheet" type="text/css"? ... When I use in zul style="mylist" it doesn't works and default style is applied!

I've any zk.xml file in my project? Is it normal?

Thanks for your help!

link publish delete flag offensive edit

answered 2014-12-09 08:42:35 +0800

silniczek gravatar image silniczek
1
http://www.banki-bez-gwia...

thx for help :)

link publish delete flag offensive edit

answered 2014-12-10 17:05:35 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Where is your CSS file placed? Please write us the complete path. Next have a look with firebug in it's console . If the CSS file is not found than there is a log out for this.

Best Stephan

link publish delete flag offensive edit

answered 2014-12-11 09:47:11 +0800

fmannelli gravatar image fmannelli
1

Hello, all is right if I use ZK6.5.0.3CE !!! WHy not in ZK7.0.3EE??

link publish delete flag offensive edit

answered 2014-12-11 13:42:43 +0800

remaleqpienszak gravatar image remaleqpienszak
1

it is all okey :!

link publish delete flag offensive edit

answered 2014-12-11 13:56:23 +0800

durniczeq gravatar image durniczeq
105 1
http://www.kredyt-dla-cie...

i have ZK6.5.0.3CE and it is working really well

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
1 follower

RSS

Stats

Asked: 2014-12-05 09:18:10 +0800

Seen: 37 times

Last updated: Dec 11 '14

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