I’m trying to center horizontally a divs in a div with 100% width. The div conteiner is “#post-area” and all divs inside, have a class “.post”.
this is the link: http://bit.ly/VOqkhv
When resize the browser is possible to see that not work good, in fact, all divs are not centering with the menu. How can fid this? I tried also with margin: auto; but nothing .
Thank you so much in advance.
Set the 100% div to
position:relative
then the element you want to center toposition:relative; margin: 0 auto;
That is because they are floating to the left. You can use inline-block instead.
Add
text-align: center;
to #post-areaRemove
float: left;
and adddisplay: inline-block; vertical-align: top; text-align:left;
to .type-post