1

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

Ehsan
  • 12,655
  • 3
  • 25
  • 44

2 Answers2

5

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

Try, -webkit-appearance: none;

Similar Question

Atif Hassan
  • 932
  • 6
  • 12
0

Safari on iPhone and iPad applies its default styling. Use:

<button type="button">

and then add the rest. It shall work perfectly.