Custom CSS: style your store and admin with your own stylesheet
Add custom CSS to your Shoporama store and admin panel to change colors, fonts, and layout or hide elements without editing theme files. You can also schedule and split test stylesheet variants and color-code the order list.
With the Custom CSS feature, you can add your own CSS to both your store and your admin panel. It's ideal for design tweaks like changing colors, fonts, and margins, or hiding elements, without editing theme files. The two are managed separately: the store's CSS is under Design → Stylesheet, and the admin panel's is under Company → Admin appearance.
How to add custom CSS
- Go to Design in the menu
- Click Stylesheet
- Enter your CSS code in the text field
- Click Save
Your CSS loads after the theme's own stylesheets, so your rules override the default styles. It applies to the whole store, not just the front page. To style the admin panel itself, you use a different page, as described under Admin customizations further down.

Stylesheet variants: multiple CSS versions on the same theme
The field with your CSS is your main stylesheet. Right below it is the Stylesheet variants section, where you can save alternative versions of the same CSS. A variant is a complete CSS version with its own name, its own visibility, and its own schedule. You can have as many variants as you like, but only one is shown at a time.
As long as no variant is active, the store uses the main stylesheet. When a variant becomes active, it takes over, and when it's switched off again, the main stylesheet is back exactly as before.
Important: An active variant replaces the main stylesheet. It isn't added on top. Everything your store needs from your own CSS must therefore be in the variant itself. That's exactly why the "Make a variant of this" button exists: it copies your entire current stylesheet into the new variant, so you start with everything you already have.
How to create a variant
There are two ways, and each has its own purpose:
- Make a variant of this (the button next to Save): saves your main stylesheet and copies the contents of the field into a new variant, which opens right away. Use it when you want to build on the design you already have.
- New variant (the button in the Stylesheet variants section): starts from scratch. You give the variant a name and can paste in CSS right away, or leave the field empty and fill it in later.
Whichever way you choose, the variant is created offline. It doesn't affect the store until you switch it on yourself or give it a date range.
The fields on a variant
| Field | What it does |
|---|---|
| Name | An internal name so you can recognize the variant. The name is only shown in the admin, never to customers. The field is required. |
| CSS | The variant's entire stylesheet. It loads after the theme's CSS, exactly like the main stylesheet does. |
| Online | Switch it on to show the variant permanently. Switch it off to hide the variant, or to show it only within a date range. |
| Visible from | The first day the variant may be shown. The period starts at the beginning of the day. |
| Visible until | The last day the variant is shown. That day is included, all the way until midnight. |
| Priority | Determines which variant is shown if several are active at the same time. The default is 0. |
Save with Save and keep editing if you want to stay on the page, or Save and close if you want to go back to the overview. Delete variant removes the variant completely.
When is a variant better than just editing the CSS?
- Campaigns that switch themselves off. Put your Black Friday styling in a variant with a start and end date. It then switches on and off by itself, and nobody has to remember to clean up on Monday morning.
- Seasons and holidays. Save your Christmas, Easter, and sale styling as separate variants, and reuse them year after year instead of building them from scratch.
- Experiment without risk. Try a bigger rewrite in a variant. If it doesn't turn out as you hoped, just switch the variant off again.
- Quick undo. One click sets the variant offline, and the store falls back to the main stylesheet, which is completely untouched. You don't have to figure out what you changed first.
- Split test. Compare two designs on real visitors instead of guessing which one sells best.
The statuses in the variant list
The Status column shows at a glance what's happening with each variant:
| Status | Meaning |
|---|---|
| Active now | The variant is shown in the store right now. |
| Offline | The variant is switched off and has no dates. It isn't shown. |
| Scheduled from | The variant has a start date that hasn't been reached yet. The date appears in the status badge. |
| Expired | The variant's end date has passed, so it's no longer shown. |
The actions on the far right
| Action | What happens |
|---|---|
| Set online / Set offline | Switches the variant on or off immediately, without opening it. |
| Edit | Opens the variant so you can change its name, CSS, visibility, and priority. |
| Clone variant | Makes a copy you can keep working on. |
| Delete the variant | Removes the variant permanently. |
A clone gets "(copy)" added to its name, is always created offline, and gets a priority one step below the original. That way, the original keeps winning until you decide otherwise, and the clone is a safe place to try something new. That also makes it the obvious starting point for a split test.
Deleting a variant can't be undone. The variant is also removed from any split tests it was part of.
How the system chooses which variant to show
On every page view, the store works out which stylesheet to use. The order is always the same:
- First, all variants that are active right now are collected, meaning those that are either set online or within their date range.
- If a split test covering at least two of them is running, visitors are split between the variants.
- Otherwise, the variant with the highest priority wins.
- If several have the same priority, the newest of them wins.
- If no variants are active, the main stylesheet is used.
The Online field and the dates work together
It's the combination of the Online field and the two date fields that determines when a variant is live:
| Online | Dates | Result |
|---|---|---|
| On | None | Active all the time, until you switch it off again |
| On | Start and/or end date | Active during the period |
| Off | None | Never active |
| Off | Start and/or end date | Active, but only during the period |
Note: A variant with a date range goes live during that period, even if Online isn't switched on. This is intentional, because it's exactly how you schedule a campaign well in advance. If a variant must never be shown, clear the date fields or delete the variant.
Priority
Priority only matters when several variants are active at the same time. The highest number wins. The default is 0, and you can use negative numbers. If two variants with the same priority are active, the newest one wins, meaning the one you created last.
Tip: Keep your permanent variants at 0, and give campaign variants a higher number, such as 10. The campaign then takes over automatically while it runs, without you having to remember to switch anything else off first.
Variants only apply to the store
- Variants only change what your customers see. The admin panel isn't affected.
- The field at the top of the Stylesheet page always shows the main stylesheet, even while a variant is live. That means you can't accidentally edit a variant when you open the page.
- To style the admin itself, go to Company → Admin appearance. That CSS exists in only one version, has no variants, and applies to all users on the account.
Why doesn't the change always show up right away?
Your store saves finished pages in a cache so they load quickly. When you switch a variant on or off, it can therefore take up to four hours before all visitors see the new CSS on the cached pages. While a split test is running, the cache is automatically turned off, so each visitor always gets the variant they've been assigned to.
For developers
Both the main stylesheet and the variants are delivered through the same call in the theme, $webshop->getStylesheet(). Shoporama's built-in themes already make this call. If your theme is built from scratch, the call must be in the theme's head section, or neither the main stylesheet nor the variants will be shown. The call returns the variant's CSS when a variant is active and the main stylesheet otherwise, so the theme doesn't have to handle variants, priority, or date ranges itself.
Split test two stylesheet variants against each other
If you have two variants, you don't have to guess which one works best. You can let your visitors decide:
- Create at least two variants, and set them both online.
- As soon as two variants are active at the same time, the shortcut Set up a split test of your stylesheet variations appears below the variant list. You can also go directly to Design → Split test.
- Give the test a name, and create it.
- Add the variants you want to include, split the traffic between them, and start the test.
A stylesheet test applies to the whole store, not a single page. That makes it the right choice when you want to test something that appears everywhere, like button colors, font sizes, or the spacing around the buy button.
Note: Both variants must be active while the test runs. If you switch one off along the way, there are no longer two to split traffic between, and all visitors get the active variant with the highest priority instead.
If you check Use the winner as the new default when the test stops, Shoporama takes care of the rest: the winner is set online and gets a higher priority than the others, and the losing variants are switched off. You can always change this manually afterward from the variant list.
The whole process, the statistics, and how the winner is determined are described in How to create and run a split test in Shoporama. If you'd like to understand the idea behind it first, you can read more about split testing as a feature.
Store customizations
Here are examples of typical customizations of the store:
Change the header background color:
header {
background-color: #1a1a2e;
}
Change the font:
body {
font-family: 'Georgia', serif;
}
Hide an element:
.element-class {
display: none;
}
Admin customizations
You can also customize the look of the admin panel with your own CSS. However, you write it in a different place from the store's stylesheet, namely under Company → Admin appearance, and it applies to all users on the account. Below is a complete overview of the CSS classes and IDs you can use.

Note: In the admin, you often need to add !important to override the existing Bootstrap styles.
The order list: CSS classes on order rows
Each order row in the order list has a set of dynamic CSS classes you can use to style orders based on their status, payment, and shipping method.
Payment status
| Class | When |
|---|---|
| .paid | The order is paid |
| .unpaid | The order isn't paid |
Example: red background on unpaid orders:
.unpaid {
background-color: #ffe0e0 !important;
}
Order status
The order's status is added directly to the row as a class:
| Class | Status |
|---|---|
| .new | New |
| .process | In process |
| .pending | Pending |
| .ready | Ready |
| .ready_for_pickup | Ready for pickup |
| .picked_up | Picked up |
| .sent | Shipped |
| .credit | Credit note |
| .cancelled | Cancelled |
Example: green background on shipped and paid orders:
.paid.sent {
background-color: #ddffeb !important;
}
Example: dimmed display of cancelled orders:
.cancelled {
background-color: #eee !important;
opacity: 0.7;
}
Shipping method
The shipping method's name is automatically converted into a CSS class. All letters become lowercase, and special characters are replaced with underscores. For example, a shipping method named "Hjemmeadresse med GLS" (home address with GLS) becomes the class .hjemmeadresse_med_gls.
Example: color-code orders by shipping method:
/* GLS orders with an orange background */
.hjemmeadresse_med_gls {
background-color: #fff3e0 !important;
}
/* PostNord orders with a blue background */
.postdanmark_til_privatadresse {
background-color: #e3f2fd !important;
}
Tip: To find the exact class for your shipping method, right-click an order row in the order list, choose "Inspect", and look at the classes on the <tr> element.
Payment gateway
Each order row gets a class based on the payment gateway's ID, in the format .payment-{ID}. To find the ID, go to Integrations → Payment gateways and look at the URL when you click edit.
Example: green background for orders paid with a specific gateway:
/* Replace 12 with your gateway's ID */
.payment-12 {
background-color: #c8e6c9 !important;
}
Other order row classes
| Class | When |
|---|---|
| .ean | The order has an EAN number (used for e-invoicing Danish public institutions) |
| .credit_note | The order is a credit note |
| .has_pickup_address | The order has a pickup address (parcel shop) |
| .no_pickup_address | No pickup address |
| .shopgatewayfail | The transfer to the accounting software (shop gateway) failed |
Example: highlight EAN orders:
.ean {
background-color: #c2caff !important;
}
Order details: classes in the expanded view
When you expand an order in the list, the order details are shown with these classes:
Order contents
| Class | Description |
|---|---|
| .order-details-content | The entire expanded order details section |
| .order-internal-comments | The internal comments field |
| .order-content-name | Product name |
| .order-content-sku | Item number (SKU) |
| .order-content-comment | Order comment from the customer |
Stock status
| Class | Description |
|---|---|
| .itemsinstock | The product is in stock |
| .itemsnotinstock | The product is out of stock |
| .shoporama-stock-in-stock | Stock > 0 |
| .shoporama-stock-out-of-stock | Stock = 0 |
| .order-content-amount-multiple | Quantity > 1 on the order line |
Example: red text on products that are out of stock:
.itemsnotinstock {
color: #ff0000 !important;
font-weight: bold;
}
Buttons in the order list
The buttons in the order list have fixed IDs you can style:
Primary buttons
| ID | Button |
|---|---|
| #btn-print | Print packing slips |
| #btn-mail | Send email |
| #btn-clone | Copy order |
| #btn-new_invoice | Re-send order confirmation |
| #btn-send_sent | Re-send order shipped email |
| #btn-current-view | CSV file (all search results) |
| #btn-shop-order-queue | View order queue |
Shipping buttons
| ID | Button |
|---|---|
| #btn-gls-api | Send to GLS |
| #btn-gls-pdf | Download GLS shipping labels |
| #btn-gls-api-return | Create return label at GLS |
| #btn-postnord-api | Send to PostNord |
| #btn-postnord-pdf | Download PostNord shipping labels |
| #btn-dao-pickup | DAO (pickup) |
| #btn-dao-pdf | Download DAO shipping labels |
| #btn-burd | Send to Burd |
| #btn-burd-pdf | Download Burd shipping labels |
| #btn-shop-gateway | Export to accounting software (Shine Regnskab/Dinero) |
| #btn-swipbox | Swipbox export |
| #btn-gls | GLS Uni-Connect |
Example: highlight the print button:
#btn-print {
background-color: green !important;
color: white !important;
}
Example: hide shipping buttons you don't use:
#btn-swipbox,
#btn-gls {
display: none !important;
}
Store-specific styling
If you manage several stores under the same company, you can style the admin differently for each store. The body element has the class webshop{ID}, where ID is the store's ID number.
Example: a different header color for each store:
/* Store with ID 123: red header */
body.webshop123 nav.top-app-bar {
background-color: #ad3c3c !important;
}
/* Store with ID 456: blue header */
body.webshop456 nav.top-app-bar {
background-color: #2a50a6 !important;
}
Tip: You can find your store's ID in the URL in the admin, or by inspecting the body element with your browser's developer tools.
Layout and navigation
| Element | Description |
|---|---|
| nav.top-app-bar | The top navigation bar |
| .drawer-light | The left menu (sidebar) |
| .drawer-menu | The menu list in the sidebar |
| .drawer-menu .nav-link | Menu links in the sidebar |
| .drawer-footer | The bottom of the sidebar |
| #layoutDrawer_content | The main content area |
Example: change the color of the left menu:
.drawer-light .drawer-menu .nav-link {
color: #333 !important;
}
.drawer-light .drawer-menu .nav-link:hover {
background-color: #f0f0f0 !important;
}
Other useful elements
| Element | Description |
|---|---|
| #demo_progress | The demo progress box (hide it with display:none) |
| td.more_unsent | The order number cell when there are several unsent shipments |
| td.bought_before | The order number cell for repeat purchases |
| .container-fluid | The page's content area. Adjust the padding, for example, to give the tables more room |
Popular use cases
Color-coding the order list
A popular setup is to color-code the order list so you can quickly tell paid and unpaid orders, and the different statuses, apart:
/* Unpaid orders in light red */
.unpaid {
background-color: #fff0f0 !important;
}
/* Paid and shipped orders in light green */
.paid.sent {
background-color: #f0fff0 !important;
}
/* Cancelled orders dimmed */
.cancelled {
background-color: #f5f5f5 !important;
opacity: 0.6;
}
/* EAN orders in light blue */
.ean {
background-color: #f0f4ff !important;
}
Highlight important action buttons
/* Green print button */
#btn-print {
background-color: #28a745 !important;
color: white !important;
}
/* Orange GLS button */
#btn-gls-api {
background-color: #ff9800 !important;
color: white !important;
}
Give the order list more room
/* Less space at the sides = more room for the columns */
.container-fluid {
padding-left: 8px !important;
padding-right: 8px !important;
}
Clearly mark products that are out of stock
.itemsnotinstock {
color: #ff0000 !important;
font-weight: bold;
font-size: 1.1em;
}
How to find the right CSS selector
To find the exact class or ID of an element:
- Right-click the element in your browser
- Choose Inspect (Inspect Element in some browsers)
- Find the element's class (for example class="unpaid sent") or ID
- Use the class or ID as the CSS selector in your stylesheet
Tip: Use your browser's developer tools (F12) to test CSS changes in real time before you save them in your custom stylesheet.
Bigger design changes
Custom CSS is well suited to smaller customizations. For bigger design changes, we recommend editing the theme files themselves via SFTP. See the article Log in with SFTP to get started.
CSS cheat sheet
Here's a quick overview of the most commonly used CSS properties, so you can get started without having to look them up.
Colors
Colors can be given as names, hex codes, or RGB:
/* Hex code (most common) */
color: #ff0000; /* Red text */
background-color: #f0f0f0; /* Light gray background */
/* Color names */
color: red;
background-color: white;
/* RGB with transparency */
background-color: rgba(0, 0, 0, 0.1); /* Black, 10% visible */
Useful color codes:
| Code | Color | Use |
|---|---|---|
| #fff0f0 | Light red | Unpaid orders |
| #f0fff0 | Light green | Paid/shipped orders |
| #f0f4ff | Light blue | EAN orders |
| #fff3e0 | Light orange | Highlighting |
| #f5f5f5 | Light gray | Dimmed/cancelled |
Font (font-family)
/* Change the font */
font-family: 'Georgia', serif;
font-family: 'Arial', sans-serif;
font-family: 'Courier New', monospace;
/* Google Fonts (add the import at the top of your stylesheet) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
font-family: 'Open Sans', sans-serif;
Text
font-size: 14px; /* Text size */
font-weight: bold; /* Bold text (or 400, 600, 700) */
font-style: italic; /* Italic */
text-align: center; /* Centered (left, right, center) */
text-decoration: underline; /* Underline */
text-transform: uppercase; /* Capital letters (lowercase, capitalize) */
line-height: 1.5; /* Line spacing */
letter-spacing: 1px; /* Letter spacing */
Background
background-color: #f0f0f0;
background-image: url('https://example.com/bg.png');
background-size: cover; /* Fill the whole area */
background-repeat: no-repeat;
Borders (border)
border: 1px solid #ccc; /* Border around the whole element */
border-bottom: 2px solid #333; /* Bottom border only */
border-left: 4px solid #28a745; /* Green left border */
border-radius: 8px; /* Rounded corners */
border: none; /* Remove the border */
Spacing (margin and padding)
/* Padding = inner spacing */
padding: 10px; /* All sides */
padding: 10px 20px; /* Top/bottom, left/right */
padding-left: 15px; /* Left only */
/* Margin = outer spacing */
margin: 10px; /* All sides */
margin-bottom: 20px; /* Bottom only */
margin: 0 auto; /* Center an element */
Show/hide
display: none; /* Hide completely (takes up no space) */
visibility: hidden; /* Invisible (still takes up space) */
opacity: 0.5; /* Semi-transparent (0 = invisible, 1 = fully visible) */
Size
width: 100%; /* Full width */
max-width: 800px; /* Maximum width */
height: 50px; /* Fixed height */
min-height: 200px; /* Minimum height */
Shadows
box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Soft shadow */
box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Stronger shadow */
box-shadow: none; /* Remove the shadow */
Frequently asked questions
I've created a variant, but my store looks exactly the same as before. What did I forget?
A new variant is always created offline, so it can't go live by accident. Go to the Stylesheet page, find the variant in the list, and click the on/off icon on the right side of the row. If the Status column says "Active now", it's live. If you still see the old design in your store, wait a little and try again, because finished pages are cached for up to four hours.
Is the variant's CSS added on top of my regular stylesheet?
No. As long as the variant is active, only the variant's CSS is used. The main stylesheet is paused, not deleted. That's why the "Make a variant of this" button exists: it copies your entire current stylesheet into the new variant. If you start with "New variant" instead and only write a single rule, all your other rules are gone for as long as the variant runs.
Can I make my Christmas styling switch itself off?
Yes, and that's one of the best reasons to use variants. Put your Christmas CSS in a variant, set "Visible from" to the day it should go live, and set "Visible until" to the last day. Both days are included, and the period ends at midnight. The campaign then switches on and off by itself, even if the Online field isn't switched on.
I've messed up a variant, and now my store looks wrong. What do I do?
Click the on/off icon next to the variant in the list so it goes offline. The store falls back to the main stylesheet, which hasn't been changed, so you don't have to figure out what went wrong in the CSS first. If the variant has dates, clear them at the same time, or it will go live again within its period.
Can I make variants of the color-coding in the order list?
No. Variants only apply to what customers see in the store. CSS for the admin itself, meaning the color-coding of orders, buttons, and menus, is under Company → Admin appearance, and it exists in only one version. On the other hand, it applies to all users on the account, so the whole team sees the same colors on the same orders.
I have several stores. Does a variant apply to all of them?
No. Both the main stylesheet and the variants belong to the individual store, so you have to create them in each store separately. If several stores need the same campaign styling, copy the CSS over manually. You can, however, color-code your stores differently in the admin, as described in the section on store-specific styling above.
What happens if I leave the CSS field empty in an active variant?
Then the store runs entirely without your own CSS, and only the theme's own design remains. That sounds like a mistake, but you can use it on purpose: if you suspect one of your own rules is breaking something, you can put an empty variant live for a moment and see whether the problem goes away. It's also how you split test "with my CSS" against "without my CSS".
How many variants can be active at the same time?
As many as you like, but only one is shown at a time. If several are active, the one with the highest priority wins, and if they have the same priority, the newest one wins. The exception is a running split test, where visitors are intentionally split between two or more variants.
Need help? Contact us at support@shoporama.dk.
Related articles
Show a notice on the SFTP access page
Learn how theme developers can show a message on the admin page with the SFTP login details using an ftp_notice file in the theme.
Optimize images for mobile with responsive images
A guide to using responsive images with srcset in your Shoporama theme, so mobile users get optimized images.
Extended fields: extra fields and HTML fields on products
How to use the Fields card on products in Shoporama: extra fields, Google Shopping custom labels, HTML fields, and the fields from your theme.
Related features
Full design freedom: your design, your rules
Design your online store freely with full access to HTML, CSS, and templates. Use ready-made themes, the drag-and-drop Page designer, or build from...
Exit-intent popup
An exit-intent popup appears when a visitor is about to leave your online store. Learn about triggers, what to show, Shoporama's popups, and best...
Slide-in
A slide-in slides in from the edge of the screen with an offer or newsletter signup. Learn about types, triggers, Shoporama's slide-ins, and best...
Sticky bar
A sticky bar is a fixed bar in your online store with key messages like free shipping and campaigns. Learn about typical uses, impact, and best...
Build your own online store without a developer or coding
Build your own online store without a developer. Pick a ready-made theme, design pages with drag and drop, and get AI help. Try it free for 30 days.
Choose a theme and understand theme settings and the page designer
Choose and switch themes in Shoporama, and learn how Webshop settings, theme settings, texts, and the page designer differ before you build your...
Montana theme settings: every field explained
Every section and field in Montana's theme settings explained with screenshots: colors, top bar, USPs, product page, checkout, and integrations.
Delaware: checkout, emails, and integrations
Every field in Delaware's theme settings for checkout, emails, terms of service, integrations, and error pages explained, with tags, examples, and...