The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved]how to center my portfolio buttons Reply To: [Solved]how to center my portfolio buttons


Block elements by default are 100% of their parent’s width.

Unless the element has another class that floats left or right, you don’t need float: none;.

What you would need is to set a width less than 100%, and then give it a margin: 0 auto;, which means margin-top and margin-bottom are 0, while the browser will center the left and right margins based on the block element’s width compared to its parent.