Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with centering Label text

 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create labels with background and borders.
I want the text inside the labels to be displayed at both the horizontal and vertical center.
I'm able to get the text at the horizontal center of the label.
I used "style=text-align:center;" to get that working..
However I could not get the text at the vertical center.
I tried many style attributes.
I used 'vertical-align' style attribute too, which doesn't work..
Any suggestions?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try line-height

Eric
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect!!!
Works great...
Thanks a lot...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic