# Window Full width

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 retag edit

## 5 Replies

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{
}
</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

jorgesereno
12

Thankx mate, obviously a stupid issue :).

andij62
301 1 6

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 {
}
.z-toolbar a, .z-toolbar a:visited, .z-toolbar a:hover {
background-color:transparent;
border:0 none;
}
...


Regards
Andi

twiegand
1807 3

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

andij62
301 1 6

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

[hide preview]