Make sap.m.CustomTile resizable for resolution e.g. from 500px to 320px

Viewed 448

I customized the sap.m.CustomTile with some sap.m.FormattedText. I need this CustomTile to be resizable according to display resolution e.g. from 500 px to 320 px. I used for this:

@media only screen and (max-width: 500px) { 

    .tileSmall.sapMCustomTile {
        width: 80.9vw !important;
        height: 80.9vw !important;
    }

}

@media only screen and (max-width: 320px) { 

    .tileSmall.sapMCustomTile {
        width: 200px !important;
        height: 200px !important;
    }

}

I can not use % because it behaves strange in my app. So I am trying to use vw instead. I did demo. I would like to keep it all the time as it for resolution 530px in the:

enter image description here

But when the resolution is change to e.g. 417px I got:

enter image description here

The resolution 357px I got:

enter image description here

Is there any way how to anchor footer and subfooter (last two rows)?

Or how to change height of the gap (created by br tag) according to tile height?

Thanks for any advice.

1 Answers
Related