html - How do I center this div element? -
i have following html , css - http://jsfiddle.net/64vur/
relevant css
.content { position: absolute; max-width: 960px; min-width: 200px; margin: 0 auto; left: 0; right: 0; }
i need have 3 columns horizontally centered , despite best efforts including looking @ other similar questions on site, can't figure out. can please help? thanks
remove
.pricing-table { float: left; }
and add
.content { text-align: center; } .pricing-table { display: inline-block; }
the problem inline-block
spaces in html separate elements, having width: 48.9%
won't have 2 elements 1 next other because space.
you can solve html comments wrapping newlines , indentation, or font-size: 0
parent , resetting each column.
in case, since had custom font-size
, can use
.content { text-align: center; font-size: 0; } .pricing-table { display: inline-block; }
Comments
Post a Comment