Reputation: 827
I have three simple html buttons styled with height
- min-width
- and border
. One with text, second with non braking space, and last with empty text.
My nob problem is on browser view, the last button with empty text is printing in different place.
CSS:
.test {
height: 27px;
border: 1px solid #b4b1ff;
min-width: 54px;
}
HTML:
<button class="test">Text</button> <!-- with text -->
<button class="test"> </button> <!-- with Non Breaking Space -->
<button class="test"></button> <!-- Empty ?? -->
see fiddle
Upvotes: 1
Views: 3560
Reputation: 115288
Button elements are, I believe inline
by default so you would need to vertically align them
CSS
body { margin: 0; padding: 0; }
.test {
height: 27px;
border: 1px solid #b4b1ff;
vertical-align: top;
}
Upvotes: 5