Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have the problem because of the <code>display:inline-block</code>...<a href="http://jsfiddle.net/2gMQ9/9/"><strong>see here</strong></a></p> <p>In this section of <strong>css</strong>,add:</p> <p>Remove all the <code>margin</code>'s set at <code>button</code>class and amend as below:</p> <pre><code>/* -------------------------------------------------- :: Button Configuration -------------------------------------------------- */ .button { display:block; /* change this from inline-block */ width:20%; /* setting the width */ margin:0 auto; /* this will center it */ position:relative; font-style:normal; font-weight:normal; font-family:"Open Sans"; font-size:14px; outline:none; color:#fff; border:none; text-decoration:none; text-align:center; cursor:pointer; -webkit-border-radius:2px; -moz-border-radius:2px; border-radius:2px; background-color:#96aa39; border-bottom:1px solid #7b8b2f; } </code></pre> <p><strong>EDIT : to use inline-block without setting a width</strong></p> <p><a href="http://jsfiddle.net/2gMQ9/14/"> <strong>inline-block demo</strong> </a></p> <p><strong>How to do</strong> only solution to center inline-block element is to use <code>text-align:center</code></p> <p>in your css class:</p> <pre><code>.service-text { text-align: center; /* add this to center the button */ } </code></pre> <p>and then add:</p> <pre><code>.service-text p{ text-align:left /* and then add this to left align the text inside the para*/ } </code></pre> <p>this way you wont need to give <code>width</code> and only <code>padding</code> would solve your problem!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload