How to set an Ionic Layout grid column width to a fixed size

Is it possible to set the ion-col to a set pixel size rather than a percentage?

I just want to set a column to a set px size…
I have the following where I want the first col to be say 10px

<ion-grid>
        <ion-row>
               <ion-col width-X='10px' style='width:10px;background-color:red'></ion-col>
                <ion-col>
                      <div><b>item 1</b></div>
                    <div>item 2</div>
                     <div>item 3</div>
             </ion-col>
         </ion-row>
    </ion-grid>

But the first column is always 50%.

Is there a way to use a fixed px?

Thanks in advance

Hi,
Do you have any solution for this?

Tnks

I am pretty sure this is the css that did it …

ion-col.my-thin-col {
    flex: 0 0 4px;
    padding:0;
    margin-right:10px;
  }

and then just apply this…

<ion-col class='my-thin-col'></ion-col>
1 Like

Thanks, it works!! :slight_smile: