We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: How to remove white borders on mobile

Solved

How can I eliminate white borders on mobile view?

julianojg
Excursionist
38 5 4

While viewing the page on mobile ( this instance being the iPhone 14 pro max) I notice that there are white borders on the side of the page while both being in both vertical and horizontal mode:IMG_0922.png

IMG_0921.png

Would it be possible to remove / change the colour of the borders?

Accepted Solution (1)
julianojg
Excursionist
38 5 4

This is an accepted solution.

{% style %}
html, body {
  background:black;
    }
{% endstyle %}

View solution in original post

Replies 5 (5)

juanvisbal
Shopify Partner
44 10 8

Hi there,

 

Could you provide a preview link so I can test on device? Thanks.

Pasilobus, Inc – Shopify Experts: www.pasilobus.com



Check out Pasilobus apps in Shopify App Store: apps.shopify.com/partners/pasilobus

juanvisbal
Shopify Partner
44 10 8

We could not see any white spaces on portrait, are these the ones you are referring to on landscape?IMG_5664.jpeg

If so, this is the safe area to avoid putting content under the iPhone's notch or Dynamic Display. You could change it to another by setting the background color for the <body> and/or <html> elements, like this:

body {
  background-color: #000; /* black */
}

 
This could be done in the Theme Editor, either with your theme settings or under Custom CSS.

Pasilobus, Inc – Shopify Experts: www.pasilobus.com



Check out Pasilobus apps in Shopify App Store: apps.shopify.com/partners/pasilobus

julianojg
Excursionist
38 5 4

this did not work 

julianojg
Excursionist
38 5 4

This is an accepted solution.

{% style %}
html, body {
  background:black;
    }
{% endstyle %}