Css - margin: 0 auto


#1

Hello.

i have some html:

<ion-pane>
    <ion-content>
       <div id="logo">
          <img class="index-logo" src="img/logo.png">
       </div>
      ...
    </ion-content>
</ion-pane>

if i set in css margin 0 auto for .index-logo in browser and emulator it works correct, but when i open it in mobile devices the img aligned to the left side. How to center it?

The same in ion-header-bar tag.


#2

Have you tried using

text-align: center;

on the #logo div? I tested this code in my app on an android device and it works properly: jsfiddle