xFilipe xFilipe - 5 months ago 10
CSS Question

Foundation 6 for sites: How to centralize anchor tags?

I'm trying to centralize an anchor tag in foundation 6, I've tried the float-center class but instead of centralize it becomes expanded:

wrong centering anchor

My code

<div class="column">
<!-- some html -->
<a class="large success button float-center">Sign Up</a>
</div>

Answer

Because float-center have display:block css property. Remove float-center from a tag and add text-center class in column div.

<div class="column text-center">
  <!-- some html -->
  <a class="large success button ">Sign Up</a>
</div>