wilsonpage
wilsonpage

Reputation: 17610

How to get button text to align top in IE?

I have some text inside a button. I want this text to be aligned at the top of the button. By default it seems to be aligned to the middle. In webkit I can get this text to align top using -webkit-box-align: start; This doesn't seem to work for IE.

Example: http://jsfiddle.net/RY6dQ/

Upvotes: 2

Views: 1340

Answers (1)

Wesley
Wesley

Reputation: 2264

You could try following (example):

html:

<button><span>Text</span></button>​

css:

button {
     height: 100px;
}

button span{
    display: block;
    position: relative;
    top: -40px;

}

Upvotes: 1

Related Questions