Looking for a solution to a design issue I'm facing. You can view the situation here: jsfiddle
<button type="submit">
<div class="icon"></div>
</button>
button {
width: 250px;
height: 250px;
background: orange;
padding: 0px;
border: 1px solid black;
display: inline-block;
position: relative;
}
.icon {
width: 150px;
margin: 0px auto 0px auto;
height: 80px;
display: block;
position: relative;
background: pink;
vertical-align: top;
}
The issue I'm encountering is that the div inside the button is not aligning to the top as I want it to. Even when I try setting negative top values or vertical-align top, the alignment doesn't seem to work correctly. This problem doesn't occur when using an a-tag instead of a button with the same CSS rules.
Has anyone faced a similar problem or have any ideas on how to resolve this?