The html buttons behave very diferently in firefox and chrome. Take this example http://jsfiddle.net/nuu1bfe2/.
<div>
<button>hi</button>
<button>hi<br/>you, there</button>
</div>
In firefox they are placed in the bottom of the parent but in chrome they are placed in the top. How do I make sure that the buttons are always placed in the top.
Just add position:absolute; top:0; right:0; to the CSS for your button.
Method 1: Using the sticky value of the position property The vertical position of the element to be stuck can also be modified with the help of the 'top' property.
You need to absolutely position the buttons inside the header. To do so, add position:relative to the button's parent element and add position: absolute and something like top: 10px; right: 30px; to the buttons.
Use the following steps to center align a button in a div container: Create a div container. Insert the button tag. In the CSS for the div set the text-align to center.
Use:
button{
vertical-align: top;
}
demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With