78
Views
10
Comments
Solved
Popup at the top of the screen instead of center
Question
Application Type
Reactive
Service Studio Version
11.54.64 (Build 63346)

I'm trying to mimic the system's popup question dialog box. I have my popup looking almost exactly like the system's, but I can't get it to open in the top center like the system popup does.  I've tried changing the popup-background CSS, trying negative margins and a few other things I found on this forum, but have had no success. 

What am I missing here?

Thanks.

2025-07-28 06-45-20
Rupesh Patil
Solution

Hi @Jeff Kest 

I have already added above use this css:

[data-popup-backdrop]:has(.popup-dialog-custom-yesno){

    justify-content: center;

    align-items: flex-start;

}

.popup-dialog.popup-dialog-custom-yesno{

    margin: 0px;

}

Thanks 

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi @Jeff Kest ,

for targeting a single popup, not all of them, you are correct to add an extra class to it.

For the popup css itself, you can just add the class to the selector, for the backdrop you'll have to add the class using :has, as it is not the backdrop itself that has the class, but the popup, which is a child.

So, taking above example by @Rupesh Patil , it would become something like :

[data-popup-backdrop]:has(.popup-at-top){
    justify-content: center;
    align-items: flex-start;
}

.popup-dialog.popup-at-top{
    margin: 0px;
}

Dorine

2025-12-04 09-01-03
Kiet Phan
Champion

Thank you, it's effective.

UserImage.jpg
Jeff Kest

@Dorine Boudry  I tried this, but it's still not popping up at the top.  I have the popup's style class set to "popup-dialog-yesno" and the CSS as: 


Does this look correct?

2025-07-28 06-45-20
Rupesh Patil
Solution

Hi @Jeff Kest 

I have already added above use this css:

[data-popup-backdrop]:has(.popup-dialog-custom-yesno){

    justify-content: center;

    align-items: flex-start;

}

.popup-dialog.popup-dialog-custom-yesno{

    margin: 0px;

}

Thanks 

UserImage.jpg
Jeff Kest
2025-07-28 06-45-20
Rupesh Patil

Hi @Jeff Kest 

You could use a Popup widget. 

Refer this link:  

https://outsystemsui.outsystems.com/OutsystemsUiWebsite/PatternDetail?PatternId=526

and add this CSS with parent class

[data-popup-backdrop]{

    justify-content: center;

    align-items: flex-start;

}

.popup-dialog{

    margin: 0px;

}

Thanks

2023-10-19 05-09-59
Mangesh Phanse

@Rupesh Patil Thanks for solution. I am looking this effect in my project

2025-02-21 07-07-34
Rishabh Tailor

Hi @Jeff 

I created a popup as you said in the question and tried. It works.

I think this is what you wanted. For the CSS check the screen's css . 

Check OML for references. Refer to the input screen in Mainflow.

Chat.oml
UserImage.jpg
Jeff Kest

Hi @Rishabh Tailor  and @Rupesh Patil 

I tried your solutions and it worked, sort of....

When I used "popup-backdrop" as the class, I got the popup to appear at the top of the screen, but it affected all 8 popups on that screen. 

I have popup dialog class named "popup-dialog-custom-yesno" and I'm trying to name the background class ".popup-custom-yesno-backdrop", but that doesn't work. I also tried "[data-popup-custom-yesno-backdrop]" but that also didn't work.

What do I name the background class so it only affects this one popup?

Thanks.

2025-07-28 06-45-20
Rupesh Patil

Hi @Jeff Kest 

Try this css:

[data-popup-backdrop]:has(.popup-dialog-custom-yesno){

    justify-content: center;

    align-items: flex-start;

}

.popup-dialog.popup-dialog-custom-yesno{

    margin: 0px;

}

I hope this helps you, 

Thanks

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi @Jeff Kest ,

for targeting a single popup, not all of them, you are correct to add an extra class to it.

For the popup css itself, you can just add the class to the selector, for the backdrop you'll have to add the class using :has, as it is not the backdrop itself that has the class, but the popup, which is a child.

So, taking above example by @Rupesh Patil , it would become something like :

[data-popup-backdrop]:has(.popup-at-top){
    justify-content: center;
    align-items: flex-start;
}

.popup-dialog.popup-at-top{
    margin: 0px;
}

Dorine

2025-12-04 09-01-03
Kiet Phan
Champion

Thank you, it's effective.

UserImage.jpg
Jeff Kest

@Dorine Boudry  I tried this, but it's still not popping up at the top.  I have the popup's style class set to "popup-dialog-yesno" and the CSS as: 


Does this look correct?

2025-07-28 06-45-20
Rupesh Patil
Solution

Hi @Jeff Kest 

I have already added above use this css:

[data-popup-backdrop]:has(.popup-dialog-custom-yesno){

    justify-content: center;

    align-items: flex-start;

}

.popup-dialog.popup-dialog-custom-yesno{

    margin: 0px;

}

Thanks 

UserImage.jpg
Jeff Kest
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.