-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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
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!
thx for help :)
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
it is all okey :!
i have ZK6.5.0.3CE and it is working really well
Asked: 2014-12-05 09:18:10 +0800
Seen: 37 times
Last updated: Dec 11 '14