Christopher Fewster Christopher Fewster - 1 year ago 83
CSS Question

Why is my button style changing when on laptop and mobile

I cant figure out why my button style would change when its on a laptop running safari compared to a phone in this case an iPhone running safari.

HTML code :

<div id="img_container">
<img src="../assets/images/hotdrinks.png" style="hight:50%;">
<button class="button" onClick="parent.location='hotdrinks.html'"> Hot Drinks Menu </button>
</div>

<div id="img_container">
<img src="../assets/images/craftbeer.png" style="hight:50%;">
<button class="button" > Craft Club </button>
</div>


CSS Code:

#img_container {
position:relative;
display:inline-block;
text-align:center;
}

.button {
position:absolute;
bottom:10px;
right:10px;
width:200px;
height:50px;
font-family: test;
color: #000000;
text-transform: uppercase;
font-size: 40px;
}


Laptop:

Image 1 on Laptop

Phone:

Image 2 on Phone

Answer Source

Safari on the iphone and ipad applies some default rendering on buttons.

Try, -webkit-appearance: none;

Similar Question

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download