3

I have a CSS button for my site which used to be full with the text in the very middle of it, but now the text is at the bottom and the button is smaller. Other people have had access to my root folder to make amendments and i dont know what they've done.

.button
{
    display: inline;
    margin-top: 2em;
    padding: 1em 2em 1em 2em;
    background: #8dc63f;
    letter-spacing: 0.20em;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 0.90em;
    color: #FFF;
}

.button:before
{
}
4
  • 2
    Are you able to post a small picture of the button? Commented Jan 17, 2014 at 9:11
  • Mike your CSS is displaying the correct output jsfiddle.net/Z2qfZ .Possibility is that you are overriding this CSS somewhere else. Commented Jan 17, 2014 at 9:15
  • Maybe a browser issue, what are you using? Commented Jan 17, 2014 at 9:17
  • Its sorted guys, cheers for the responses Commented Jan 17, 2014 at 9:18

3 Answers 3

3

try: display: inline-block

That should sort it.

Sign up to request clarification or add additional context in comments.

1 Comment

This sorted it :) Thanks and thanks everyone for their answers
0

Add display: block; and text-align:center;

    .button{
    display: block;
    text-align:center;
    margin-top: 2em;
    padding: 1em;
    background: #8dc63f;
    letter-spacing: 0.20em;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 0.90em;
    color: #FFF;
   }

DEMO

Comments

0

You can try this :-

text-align: center;
display:table-cell;
vertical-align:middle;

Hope it will help you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.