Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

center element horizontally in div

#inner {
  display: table;
  margin: 0 auto;
  border: 1px solid black;
}

#outer {
  border: 1px solid red;
  width:100%
}

<-- Html -->

<div id="outer">
  <div id="inner">Foo foo</div>
</div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #center #element #horizontally #div
ADD COMMENT
Topic
Name
6+6 =