Skip to main content
All CollectionsTroubleshooting
Site Header overlaps UpCart
Site Header overlaps UpCart

How to fix UpCart hiding behind the website header

Updated over a week ago

In some themes, UpCart may be hidden behind the site header when opened.

If this happens on your store, please follow these instructions:

  1. Copy the code at the bottom of this document

  2. Go to UpCart > Cart Editor > Settings >Advanced Settings> Custom HTML

  3. Click on the HTML dropdown to find the option "Scripts (Before load)"

  4. Paste the copied code and Save changes

  5. Refresh your storefront page, and the issue should be resolved.

Code Required:

<script>
// Find UpCart
let upcart = document.querySelector("#upCart");

// Find the site's body
let body = document.body;

// If we found both
if(upcart && body)
// Move upcart to the top of the body's children so it takes priority over site header
body.firstChild.before(upcart)
</script>
Did this answer your question?