Hello person!
I would like to ask for help with something that is theoretically very simple, but that I have not been able to solve.
I have a CardBackground that has my background image and a trash icon inside.
I want to align this trash can icon in the top right corner of the image, but I can't.
I've tried using different options, some even show the position correctly in the studio, but when I open the project in the browser or cell phone the icon simply doesn't stay in the right place.
I've already tried using the standard classes from OutSystems ("display-flex justify-content-flex-end"), in the studio the position is correct but in the app it's not.
I've also tried using the component (ColumnsSmallRight), placing the icon in the smaller column on the right, and the same thing happens, in the studio the position is correct but in the real app it's not.
And lastly I tried using CSS.
This icon is in a smaller container than is inside a container that is the height of the background image.
The CSS used was the following:
.Biggest Container{
position: relative;
}
.Container with icon{
position: absolute;
right: 0;
And the same thing repeats itself, the position is correct in the studio, but not in the app.
Would anyone know how I can resolve this?
I also leave a link to a copy of this screen with anonymous access for anyone who wants to test and inspect the code.
LINK: https://personal-sazpoglu.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Smartphone&URL=/CloneOfImobi/ImovelDetail3?_ts=638539024322705661
Thank you all!
Hi @Luiz Lima ,
I have tried using the inspect element of chrome browser and found that
When I removed the position relative to static for class "m".
And this will fix your issue.
Hope this helps.
Regards,
Supriya
Hi Supriya!
Thank you very much for your help, it solved my problem!
Thank you very much!
Hi @Luiz Lima,
Glad to help you. Your always welcome.
Hi @Luiz Lima, Solution provided by @Supriya Jawla is working, but your current CSS is also fine. The issue is that you forgot to add width to the container with class "m," so it is only taking the width of your trash icon. As a result, the trash icon container appears to be on the left side when, in reality, it is on the right side of its parent container. This can be fixed by adding "width: 100%" to your class "m" and the delete icon is will be positioned correctly.ThanksGitansh Anand
Just remove the class "m" from the container above the icon or add "width:100%" property to that class. It will adjust accordingly.
Before
After
If you want the class "m" and also to adjust the position of the DELETE icon, then you can create a new class, give the following properties, and apply them to that icon.
These properties are according to the screen you have. You can modify it according to your needs and use media queries for other screen resolutions.