0

I currently have one line of text it is perfectly centered, but when I add a second line of text it floats beneath the first line.

I'd like it to be centered vertically even for multi-line button titles. How would I go about doing this using CSS?

shaun
  • 1,017
  • 11
  • 22
Dan
  • 2,647
  • 2
  • 27
  • 37

2 Answers2

1

Does it have to have fixed height? If not, remove the rule

.sqs-block-button-element.sqs-block-button-element--small {
    height: 16.4px;
}
wunth
  • 634
  • 4
  • 13
0

I think you are trying to get two elements of text on the same line?

If so, you would use display: inline in your css. This will make both lines appear inline or on the same line.

JoshK
  • 425
  • 1
  • 4
  • 18
  • No I'm just trying to center the text vertically. Right now because the second line goes beneath the first line it's making the text off center (vertically). – Dan Apr 22 '15 at 01:21
  • Can you give me an example of the html/css code so i can get a clear understanding of what you need help with – JoshK Apr 22 '15 at 01:23
  • Here's my website, it's in the middle of the front page that I'm having trouble with those buttons. http://www.bargainsight.com/ – Dan Apr 22 '15 at 01:24
  • I think padding works: http://stackoverflow.com/questions/5184856/html-vertical-align-the-text-inside-input-type-button – JoshK Apr 22 '15 at 01:33