# Add a stylesheet to admin

Source: https://zotonic.com/cookbook/1430/add-a-stylesheet-to-admin

URI: https://zotonic.com/id/1430

Language: en

Use a small active module or site template override.

Place your stylesheet at `priv/lib/css/garden-admin.css` in the site or an active module. Add `priv/templates/_html_head_admin.tpl`:

```django
{% lib "css/garden-admin.css" %}
```

The admin head collects these templates from active applications. Keep selectors scoped to your own widget or a deliberate admin class; broad rules for every input or button can break other modules.

For a reusable module, use an OTP application such as `zotonic_mod_garden_admin`, with `src/zotonic_mod_garden_admin.app.src` and main module `mod_garden_admin.erl`. The application and module names differ intentionally. Follow the module creation task for its complete application metadata and activation.

Compile, enable the module if applicable, reload admin and inspect the stylesheet request. Test narrow and wide screens and the form's error state.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1430?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1430?language=en>)
