# Custom CSS

Write your own CSS for a menu, or add a custom class to an item, to change what the design options can't — and what to do if your theme's CSS interferes.

The **Design** tab covers most looks: colours, fonts, spacing, borders, animation. When you need something it doesn't offer — a special hover, a hidden element, a theme-specific fix — add your own CSS. It's saved with the menu and applies to that menu only.

## Add CSS to a menu

**In the new editor:**

1. Open the menu in the editor and click the **Settings** pane (the gear, third of the three icons above the tree).
2. Click **Custom CSS**.

   ![Screenshot: The new editor with the Settings pane (gear) and the Custom CSS button outlined in red]()

3. Write your CSS and click **Save**.

**In the classic editor:**

1. Open the menu in the editor and go to **Settings** (the gear icon in the editor's icon bar).
2. Click **Custom CSS**.

   ![Screenshot: The Settings pane of the classic editor, reached by the gear icon in the icon bar, with the Custom CSS button outlined in red]()

3. Write your CSS and click **Save**.

![Screenshot: The Custom CSS dialog with a media query that sets the menu bar text to 17px]()

The CSS loads together with the menu, on your storefront. Right-click a menu item on your store and choose **Inspect** to find the class names you can target; the menu's own start with `h2m-`, for example:

| Class | What it is |
| --- | --- |
| `.h2m-menu-nav` | The menu bar |
| `.h2m-main-menu-item` | One item of the menu bar |
| `.h2m-menu-item-inner` | The link of an item |
| `.h2m-menu-title` | The text of an item |

## Custom class on an item

Every item also has a **Custom class** field in its options. Whatever you type is added to the item's classes, so you can style just that one:

```css
.sale-link .h2m-menu-title {
  color: #d72c0d;
}
```

(with `sale-link` entered as the item's custom class).

## When your theme's CSS gets in the way

Some themes style every list and link in the header, which changes the menu's spacing, fonts or colours. In **Settings** of the app, turn on **Theme CSS conflicts** to stop the theme's CSS from reaching the menu — see [Settings](https://menudocs.nx8apps.com/settings). Your own custom CSS still applies on top of it.

## Move CSS to another store

Custom CSS is part of the menu file. When you [import a menu](/manage-menus#export-and-import-a-menu), tick **Override custom CSS** to bring it along. Only do that if the other store uses the same theme, since selectors written for one theme rarely suit another.
