horizontal center text div css





In this article, Stephen Shaw introduces a technique for perfect horizontal and vertical centering in CSS, at any width.Absolute-Center.is-Left right: auto left: 20px text-align: left If you have a fixed header or need to add

a display of inline-block and then apply text-align: center on the containing block (remove the float as well): Div background: red overflow: hidden text-align: center . Text can be aligned in center of a div or any other block level element using CSS property text-align:center.Align text in middle horizontally.