So i need to create layout with 3 or 4 squares centered in it. As now many different screens are (i at the moment have 21 philips, macbook 13 and ipad) and on all of them the squares are different.

So i need it centered in any screens. Here some of my code:
Some CSS:
#main{
border: 1px solid red;
margin: auto;
}
#block{
display: inline-block;
padding: 110px;
border: 1px solid red;
margin: 10px 10px;
overflow:hidden;
}
Some HTML:
<div id="wrapper">
<div id="header">
header
</div>
<div id="main">
<div id="block">main</div>
<div id="block">main</div>
<div id="block">main</div>
<div id="block">main</div>
<div id="block">main</div>
<div id="block">main</div>
<div style="clear:both"></div>
</div>
</div>
I tried different ways with some extra div…



So i need that this squares would automatically centered in any screens
Since you’re just using
inline-block, you can center the text of the container.Also, use classes for non-unique elements.
Fiddle: http://jsfiddle.net/LWTNB/3/
Updated HTML:
Updated CSS: