Hi
I am working on a project where I need to create a small block, as shown.
It looks fine on all android devices, browsers and also Apple simulators using XCODE.
But when it’s on an iPad or iPhone.
It looks like this:
This is my code:
<ion-row style=" margin-left: -30px;">
<ion-col class="gaugerangetext_col">
<ion-item class="gaugerangetext_col_low_graphpage"></ion-item>
<ion-text class="gaugerangetext_plot">Good 0-30</ion-text>
</ion-col>
<ion-col class="gaugerangetext_col">
<ion-item class="gaugerangetext_col_medium_graphpage"></ion-item>
<ion-text class="gaugerangetext_plot">Moderate 30-60</ion-text>
</ion-col>
<ion-col class="gaugerangetext_col">
<ion-item class="gaugerangetext_col_high_graphpage"></ion-item>
<ion-text class="gaugerangetext_plot">Bad 60-90</ion-text>
</ion-col>
</ion-row>
.gaugerangetext_col_low_graphpage {
width: 20px;
height: 10px;
--background: #0c8eca; ///change
//margin: 0 auto;
margin: 0 auto;
left: 50%;
top: 15px;
transform: translateX(-50%);
}
.gaugerangetext_col_medium_graphpage {
width: 20px;
height: 10px;
--background: #eeb333;
margin: 0 auto;
margin: 0 auto;
left: 50%;
top: 15px;
transform: translateX(-50%);
}
.gaugerangetext_col_high_graphpage {
width: 20px;
height: 10px;
--background: #f0250a;
margin: 0 auto;
margin: 0 auto;
left: 50%;
top: 15px;
transform: translateX(-50%);
}
This issue gets solved if I was to comment out
transform: translateX(-50%);
But then this means by blocks are not well centred.
Can someone advice why transform: translateX(-50%);` would effect an Apple device only?