# WebClient: center all components no metter of browser

**URL:** <https://forum.servoy.com/t/webclient-center-all-components-no-metter-of-browser/15056>\
**Category:** Classic Servoy\
**Created:** [November 17, 2011, 11:03am UTC](https://forum.servoy.com/t/webclient-center-all-components-no-metter-of-browser/15056 "2011-11-17T11:03:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tokajac](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@Tokajac](https://forum.servoy.com/u/Tokajac)\
**Post date:** [November 17, 2011, 11:03am UTC](https://forum.servoy.com/t/webclient-center-all-components-no-metter-of-browser/15056/1 "2011-11-17T11:03:11Z")

</div>

Hello,

Is there a way to center all components from the form in browser no matter of window’s size and how much it’s zoom in/zoom out (ctrl+scroll)?  
Have tried through properties and through CSS but no success yet: tried to attach style to form and to all components separately  
[http://www.w3schools.com/css/tryit.asp? … rgin\_sides](http://www.w3schools.com/css/tryit.asp?filename=trycss_margin_sides)

```auto
<html>
<head>
<style type="text/css">
p
{
background-color:yellow;
}
p.margin
{
margin-left: auto;
margin-right: auto;
width:300px;
}
</style>
</head>

<body>
<p>This is a paragraph with no specified margins.</p>
<p class="margin">This is a paragraph with specified margins.</p>
</body>
</html>

```

Also tried the !important directive

Regards

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [December 14, 2011, 4:24pm UTC](https://forum.servoy.com/t/webclient-center-all-components-no-metter-of-browser/15056/2 "2011-12-14T16:24:28Z")

</div>

You can show the webclient in een iframe and center that.
