Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

center div element horizontally

<div class="center">this content will be in the horizontally centered of your page</div>
<style>
/** this is the css to center a DIV or any element **/
.center {
  display: table;
  margin: 0 auto;
}
</style>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #center #div #element #horizontally
ADD COMMENT
Topic
Name
7+3 =