Ignoring device-width


Actually I don’t know if this is a real Ionic question, but here it is anyways:

I use the viewport meta tag in my index.html

<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

Works fine. Now I’m using the Grid System from Ionic, lets say I have a row with 2 columns. I want one column not to have a %-width but always a fixed width, for example 100px. I gave the column a class who made it 100px in my browser, and it looks great.

Now when I’m testing on my mobile device, the 100px width does not have the same fixed width as on my browser, it’s a lot smaller on my device. I suppose this has to do with the device-width.

Is there any way to always get the same width I have in my browser (I’m using Chrome) and so ignoring the device-width? I don’t know if this is a good way, or are there any other workarounds for this?


You can fixed it by adding:

width:100px; /* or whatever width you want. /
max-width:100px; /
or whatever width you want. /
min-width:100px; /
or whatever width you want. */
display: inline-block;

you can try it.


Thanks man it worked perfectly! :smile: