-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I just start eclipse with zk plugin and create some application. In the file "index.zul" created in wizard i have the code:
<?page id="masterMindPage" title="MasterMind v1.1" contentType="text/html;charset=UTF-8"?> <zk> <window id="sgpWindow" width="100%" height="100%" contentStyle="background-color:gray; padding:0; margin:0"> <hbox width="100%" height="100px" style="background-color: gray;"> <label>Teste</label> </hbox> </window> </zk>
When i run the aplication i get full browser height gray but i get two vertical white borders one in the left and other in the right.
How can i really set the application width to 100% of the browser without the borders on both sides?
Thankx
jorgesereno,
Try modifying your code to look like this:
<?page id="masterMindPage" title="MasterMind v1.1" contentType="text/html;charset=UTF-8"?> <zk> <style> body{ padding:0px; } </style> <window id="sgpWindow" width="100%" height="100%" contentStyle="background-color:gray;"> <hbox width="100%" height="100px" style="background-color: gray;"> <label>Teste</label> </hbox> </window> </zk>
That should do it.
Regards,
Todd
Thankx mate, obviously a stupid issue :).
Hi Todd,
your answer helps me too. But when i define the body-tag in an external css-file than it has no effect. What is wrong?
<zk> <window id="teamWin" height="100%" width="100%" apply="bpmobil.TeamCtrl"> <style src="css/bpmobil.css" dynamic="true" /> ...
and the css-file
body { padding:0px; } .z-toolbar a, .z-toolbar a:visited, .z-toolbar a:hover { background-color:transparent; border:0 none; } ...
Regards
Andi
Andi,
There doesn't seem to be anything wrong with your code. I usually put <style> tags prior to the <window> but that I think that is just a matter of personal taste because I've tested it your way and it works fine too.
My guess as to your problem is that your path to the CSS file is somehow incorrect and ZK can't find it. I'd suggest temporarily moving the CSS file where your zul file resides and then removing the path information in your <style> tag so it looks like this:
<style src="bpmobil.css" dynamic="true" ></style>
If that works, then you'll know where to start looking.
Hope that helps,
Todd
Hi Todd,
thanks for your answer. The path to the css-file is right bacause another styles defined in the file are displayed correct. I think that one of the many definitions in the css-file is wrong and manipulate the body-style.
Andi
Asked: 2012-01-20 11:56:35 +0800
Seen: 128 times
Last updated: Jan 20 '12