views:

6

answers:

1

i'm using the char to make a line break in a button label. here is the code:

<html>

<input style='width: 50px;height:60px;' type='button' value="abc" />
<input style='width: 50px;height:60px;' type='button' value="abc&#10;asd" />
</div>

the problem is that a button that's has the char in his label is not in the same height on the line as the second button. it only happens when i set the width and the height on the buttons. here is how it looks: http://jenya.moroshko.com/buttontest.html

any suggestions?

A: 

I didn't know you could do it! They are misaligned, because by default buttons are aligned to the basline of text inside them -- and in your case the browser chooses the bottom line of text for that. If you look closely, you will notice that the baselines align. You can work around that by using vertical-align: middle/top/bottom.

Radomir Dopieralski