diff --git a/solara/server/templates/solara.html.j2 b/solara/server/templates/solara.html.j2
index c3fdccd23..329800c7c 100644
--- a/solara/server/templates/solara.html.j2
+++ b/solara/server/templates/solara.html.j2
@@ -276,7 +276,7 @@
location.reload();
},
async changeThemeCSS(theme) {
- let css = await fetch(`/static/assets/theme-${theme}.css`).then(r => r.text());
+ let css = await fetch(`${solara.rootPath}/static/assets/theme-${theme}.css`).then(r => r.text());
document.getElementById('jupyter-theme-css').innerHTML = css;
}
},