Align contents of a div in the center

Posted by Jim on Stack Overflow See other posts from Stack Overflow or by Jim
Published on 2013-11-11T09:41:52Z Indexed on 2013/11/11 9:53 UTC
Read the original article Hit count: 164

Filed under:
|

I have a div with width:100%; since I want to fill out the parent container.
I also want to have the contents of the div in its center. I can not find a horizontal-align:center attribute for the divs. How can I configure the div so that its contents are in the center?
I.e if the div is this big:

------------------------------------------------------------------------------------------------------------  
                    Enclosing tags here  
                    in the center  
------------------------------------------------------------------------------------------------------------        

© Stack Overflow or respective owner

Related posts about html

Related posts about css