I am trying to center an image inside a div
inside a ion-slide-box
like this
<ion-content>
<ion-slide-box on-slide-changed="slideHasChanged($index)"
auto-play="true"
slide-interval="2000"
does-continue="true"
show-pager="false"
style="height: 200px !important;">
<ion-slide ng-repeat="image in images">
<div style="text-align: center; width: 300px;">
<img ng-src="{{ image.src }}" style="width: 100%; text-align: center !important;"/>
</div>
</ion-slide>
</ion-slide-box>
</ion-content>
The result is this, I have tried a bit of everything css
but I can not get my desired result
You can use this in your CSS
and in your image the following
This way you don't need to adjust each image by itself and that seems very descriptive to me, when you look at the HTML code. Also, it is not limited to a specific image size.
Another way is in your div and flex box
and in your div