Force mobile view

Hi

How do I force my store locator widget to always show in the mobile view? :slight_smile:

1 Like

Hi there, @Kasper_Skov_Jensen :waving_hand:

Please try this CSS code:

.global-styles,
[class*="widget__Container-sc"] {
    width: 600px !important;
}

You can make the width less by changing the pixel amount :raising_hands:

Does this work for you?

2 Likes

Hi @Irene

I’m still seeing a bit of the map.

I would like to only have the list (like it is on mobile)

1 Like

I see. Let’s try it with another width value:

.global-styles,
[class*="widget__Container-sc"] {
    width: 480px !important;
}

Does it look good for you now? :smiling_face:

1 Like

Hmmm… same issue.

Another fix is to get the pop op to open on top of the widget in stead of on top of the page

1 Like

Oh, so sorry for this! Seems to have worked good on my end :thinking:

Could you please send me a direct link to the webpage with the widget? The devs will take a look for you :technologist:

1 Like
1 Like

Thanks!

I noticed that the code I sent was applied at the Custom JS section of the widget instead of the Custom CSS on the Style tab. I moved the code there and it worked :tada:

Could you please check it one more time? :folded_hands:

1 Like

My bad!

Thank you so much :slight_smile:

I still think it would be a usable setting to have the pop up showing on the widget instead of at the top of the page.

1 Like

Hi there, @Kasper_Skov_Jensen :waving_hand:

I’ve checked your widget and see that the popup covers the whole page and appears at the top. To display it at the center and reduce it, please try to use the CSS code below:

[class*="layout-background__StyledWidgetBackground-sc"],
[class*="location-card__Container-sc"],
[class*="location-card-popup__ScrollableWrapper-sc"],
[class*="location-card-popup__StyledPopup-sc"] {
  height: auto !important;
  min-height: auto;
}

[class*="Popup__PopupInner-sc"] {
  align-items: center;
  justify-content: center;
}

[class*="location-card-popup__StyledPopup-sc"] {
  max-width: 480px;
}
1 Like