Ionic 1 - using css to set grid cell width

Moderator: Support

AndyP
Posts: 10
Joined: Thu Jul 23, 2020 8:25 pm

Ionic 1 - using css to set grid cell width

Post by AndyP »

Hi,

In an Ionic-1 project can you tell me how to set the width of a specific cell to a bespoke width (other than the % in the properties panel) please?

I've tried to use

.setCellWidth {
width: 5% !important;
}

but it has no effect......

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Re: Ionic 1 - using css to set grid cell width

Post by Serhii Kulibaba »

Hello,

Please add the custom class to the grid component and use it in the following CSS code for that:

Code: Select all

.myGrid .row .col{
    width:50px;
    min-width: 50px;
    max-width: 50px;
}
AndyP
Posts: 10
Joined: Thu Jul 23, 2020 8:25 pm

Re: Ionic 1 - using css to set grid cell width

Post by AndyP »

many thanks!

Post Reply