Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to center y-axis in td element

 
simon tiberius
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried:


but didn't work. the text in td is still on top of td. how to make it centered?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi simon,

<td> tag already have defined valign attribute to do that.

But
The <td> valign attribute is not supported in HTML5. Use CSS instead. [Reference]

So try
valign:middle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic