Scope and limitations
Custom CSS only affects content rendered inside the webview. It cannot restyle Median’s native UI elements, such as the top navigation bar, bottom tab bar, or status bar, as those are native elements configured separately in App Studio, not part of your website’s markup.Custom CSS in Median apps
Apply global CSS rules
In App Studio, open the Web Overrides → Custom CSS field and paste your rules. For example, the snippet below restyles the navigation and footer on every page:Use your AI agent
Use the Median MCP with your AI agent to replace your app's custom CSS. See Median MCP server to set it up.
The MCP can’t read your current CSS, so give your agent the complete set of rules you want.Apply conditional CSS using JavaScript
As an alternative to hardcoded CSS overrides, you can apply CSS dynamically using JavaScript. This is especially useful if your design changes frequently or you need conditional logic. Here’s how to do it:Advanced: Server-side CSS based on user agent
For full control and scalable styling changes without republishing your app, serve alternate CSS files from your backend based on whether the request originates from your mobile app. This approach works well if you already have server-side rendering or a backend that can branch on request headers. Learn how to detect Median app requests using a custom user agent.Maintainability and risks
Custom CSS becomes part of your app’s build, not your live website. CSS entered under Web Overrides is compiled into your app’s configuration at publish time and does not update live the way a change to your actual website does. To change or remove a Custom CSS rule after your app is live, update the configuration in App Studio and republish your app to the App Store and Google Play. Each store then reviews and rolls out the update, which takes time. This has a few practical consequences worth planning around:- Selector drift breaks silently: If your website’s markup changes later (for example, a class gets renamed or a widget gets swapped out), your Custom CSS rules can stop matching anything, or worse, start matching the wrong elements.
- Rollout isn’t instant: Even after you republish, users only get the updated CSS once they update the app, and Apple/Google’s review process adds delay before that’s even possible.
- It scales poorly for frequently changing UI: If your website’s layout changes often, every one of those changes potentially requires a new app submission just to keep the CSS override correct.
Troubleshooting
My CSS isn’t applying at all
Confirm the rules were saved under Web Overrides → Custom CSS in App Studio. During development, use App Studio’s preview/simulator to check changes, but remember that once your app is live, any edit to Custom CSS requires a full republish before real users see it (see Maintainability and risks). Also check the browser console for CSS syntax errors, which will silently fail to apply.My CSS applies, then gets overridden a moment later (flicker)
This is almost always a missing!important flag. Since your website’s own stylesheets may load or re-render after Median injects your custom CSS, !important is what guarantees your rules win.