0

Window Full width

asked 2012-01-20 11:56:35 +0800

jorgesereno gravatar image jorgesereno
12

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

delete flag offensive retag edit

5 Replies

Sort by » oldest newest

answered 2012-01-20 16:57:24 +0800

twiegand gravatar image twiegand
1807 3

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

link publish delete flag offensive edit

answered 2012-01-20 17:16:38 +0800

jorgesereno gravatar image jorgesereno
12

Thankx mate, obviously a stupid issue :).

link publish delete flag offensive edit

answered 2012-01-20 20:04:13 +0800

andij62 gravatar image andij62
315 1 7

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

link publish delete flag offensive edit

answered 2012-01-20 20:32:02 +0800

twiegand gravatar image twiegand
1807 3

updated 2012-01-20 20:33:40 +0800

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

link publish delete flag offensive edit

answered 2012-01-20 21:12:47 +0800

andij62 gravatar image andij62
315 1 7

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

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-01-20 11:56:35 +0800

Seen: 128 times

Last updated: Jan 20 '12

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