Plugin how-tos · Guide
How to Style Ninja Forms (Step by Step)

Short answer
Style Ninja Forms in three layers. Choose Light, Dark or None under Opinionated Styles in the Ninja Forms settings, add custom class names to fields in each field's Display section, then target those classes and the built-in nf selectors with CSS in your theme's Additional CSS area.
Key takeaways
- Set Opinionated Styles to Light, Dark or None first.
- Label position and placeholders are set per field.
- Custom class names give you clean CSS hooks.
- Scope CSS to a form ID to style one form only.
- Clear caches when styles do not appear.
- Layout & Styles is the paid route to columns.
How do you style Ninja Forms?
You style Ninja Forms in layers: pick a base style in the plugin settings, add custom classes to forms and fields, then write CSS for those classes in your theme's Additional CSS area.
Ninja Forms deliberately ships with light styling so forms inherit your theme's fonts and colours. That keeps forms consistent, but it also means the default look can feel plain or clash with a theme.
This guide covers the free route first, then the paid add-on and helper plugins. You will need admin access and, ideally, a staging site for testing.
If you are new to the plugin, our overview of what Ninja Forms is explains how forms, fields and actions fit together.
What styling options does Ninja Forms include for free?
The free plugin gives you a global base style setting, label position choices, custom class name fields, and placeholder text, with everything else handled through CSS.
| Option | Where to find it | What it controls |
|---|---|---|
| Opinionated Styles | Ninja Forms > Settings | Light, dark or no base styling for all forms |
| Label position | Form display settings and each field's Display section | Labels above, below, left, right or hidden |
| Custom class names | Each field's Display section and form display settings | Your own CSS hooks for containers and elements |
| Placeholder text | Each field | Hint text inside inputs |
| Layout & Styles add-on | Paid extension | Columns, drag-and-drop rows and a style panel |
Menu labels can shift a little between versions. The Ninja Forms documentation page on styling your forms is the reference to check if a setting has moved.
How do you choose a base style for every form?
Go to Ninja Forms > Settings and set Opinionated Styles to Light, Dark or None, then save and preview a form.
Light adds borders, padding and simple field backgrounds that suit pale themes. Dark is designed for dark backgrounds. None leaves styling entirely to your theme and your own CSS.
Pick None if you plan to write a lot of custom CSS. It removes default rules you would otherwise have to override, which keeps your stylesheet shorter.
Pick Light or Dark if you only want small tweaks. You start from a tidy form and adjust colours and spacing on top.
How do you change label positions and placeholders?
Open the form in the builder, click a field, and use its Display settings to set the label position and placeholder text.
Label options typically include above, below, left, right and hidden. Left-aligned labels give compact desktop forms, while labels above fields read better on phones.
If you hide labels, add placeholder text so people still know what to type. Keep the label text filled in, though, because screen readers still rely on it.
You can also set a default label position for the whole form under the form's display settings. Individual fields can then override it where needed.
How do you add custom CSS classes to Ninja Forms?
Click a field in the form builder, expand its Display section, and type a class name into the container or element class field.
The container class goes on the wrapper around the whole field, including the label. The element class goes on the input itself. Use container classes for layout and element classes for colours and borders.
Pick short, clear names such as half-width or highlight-field. You can reuse the same class on many fields and forms.
The form itself also has class name settings in its display options. A form-level class lets you style one form differently from another without touching the rest.
Ninja Forms explains these fields in its guide on how to use custom CSS.
Where do you add your CSS?
Add CSS in Appearance > Customize > Additional CSS on classic themes, or in the Site Editor's Styles panel under Additional CSS on block themes.
Both places save CSS in the database, so your changes survive theme updates. If you use a child theme, its style.css works too.
Avoid editing the Ninja Forms plugin files. Plugin updates overwrite them, and your changes disappear without warning.
If you have never added CSS to WordPress before, our guide on CSS changes not showing helps when something does not seem to apply.
Which CSS selectors does Ninja Forms use?
Ninja Forms wraps every form and field in predictable classes, so you can target the whole form, each field container, labels, inputs and the submit button.
These are the selectors people use most:
.nf-form-cont /* outer form wrapper */
#nf-form-3-cont /* one specific form, ID 3 */
.nf-field-container /* each field wrapper */
.nf-field-label label /* field labels */
.nf-field-element input,
.nf-field-element textarea,
.nf-field-element select /* inputs */
.submit-wrap input /* submit button */
.nf-error-msg /* validation errors */
.nf-response-msg /* success message */
Replace 3 with your own form ID, which you can see in the form list and in the shortcode.
To confirm a class, right-click the form on the front end and choose Inspect. The Chrome DevTools CSS guide shows how to view and test styles live before saving them.
How do you style inputs and the submit button?
Target the input elements and the submit wrapper with your own colours, borders, padding and hover states, scoped to the form wrapper.
Here is a clean starting point:
.nf-form-cont .nf-field-element input,
.nf-form-cont .nf-field-element textarea,
.nf-form-cont .nf-field-element select {
border: 1px solid #cbd5e1;
border-radius: 6px;
padding: 10px 12px;
font-size: 16px;
}
.nf-form-cont .nf-field-element input:focus,
.nf-form-cont .nf-field-element textarea:focus {
border-color: #2563eb;
outline: 2px solid #bfdbfe;
}
.nf-form-cont .submit-wrap input {
background: #2563eb;
color: #fff;
border: 0;
border-radius: 6px;
padding: 12px 24px;
cursor: pointer;
}
.nf-form-cont .submit-wrap input:hover {
background: #1d4ed8;
}
A font size of 16px on inputs stops many phones from zooming in when someone taps a field.
Keep a visible focus style. Removing outlines makes the form hard to use with a keyboard, and the MDN guide to :focus-visible explains a cleaner way to show focus only when it helps.
How do you put Ninja Forms fields side by side?
Add a class such as half-width to two field containers, then use CSS to make those containers sit next to each other on larger screens.
@media (min-width: 640px) {
.nf-form-cont .half-width {
display: inline-block;
width: 48%;
vertical-align: top;
}
.nf-form-cont .half-width + .half-width {
margin-left: 4%;
}
}
On phones the media query does not apply, so fields stack in a single column. That is usually what you want on small screens.
If you need many multi-column rows, the paid Layout & Styles add-on is easier to maintain. Ninja Forms describes it on its layouts and styles documentation page.
How do you style one form differently from the rest?
Scope your CSS to that form's ID wrapper, such as #nf-form-3-cont, or to a custom class you added in the form's display settings.
For example, a newsletter form in a dark footer might use light text and transparent fields, while your main contact form keeps the site defaults.
#nf-form-3-cont .nf-field-label label { color: #f8fafc; }
#nf-form-3-cont .nf-field-element input {
background: transparent;
color: #f8fafc;
border-color: #64748b;
}
Scoping also prevents your rules from leaking into other forms or other plugins that use similar markup.
How do you style error and success messages?
Target .nf-error-msg for validation errors and .nf-response-msg for the confirmation shown after submission, then give them clear colours and spacing.
.nf-form-cont .nf-error-msg { color: #b91c1c; font-size: 14px; }
.nf-form-cont .nf-response-msg {
background: #ecfdf5;
border-left: 4px solid #10b981;
padding: 12px 16px;
}
Make sure error text has enough contrast with the background. Red on white works, but light red on pink can be hard to read.
Test by submitting an empty required field, then a complete form, so you see both states.
Can a plugin style Ninja Forms without code?
Yes, styler plugins such as Styler for Ninja Forms Lite add visual controls for colours, borders and spacing, and the paid Layout & Styles add-on adds a built-in style panel.
Styler for Ninja Forms Lite works through the Customizer, so you see changes live. It suits people who prefer clicking to writing CSS.
The trade-off is extra code on every page that loads a form. For a site with one or two simple forms, a few lines of CSS are lighter.
Check plugin reviews and update history in the Ninja Forms plugin directory listing and any add-on page before installing.
Why are your Ninja Forms styles not applying?
Styles usually fail because a cache still serves old CSS, your selector is less specific than a theme rule, or a typo breaks the CSS block.
Clear your caching plugin, host cache and browser cache first. Our guide on how to clear cache in WordPress covers each layer.
Next, inspect the field and see whether your rule appears crossed out. If it does, a more specific rule is winning, so add the form wrapper to your selector rather than reaching for !important.
If the form itself does not render, the problem is not styling. See our guide on Ninja Forms not loading for script and conflict fixes.
What makes a well-styled form?
A well-styled form is easy to read, clearly labelled, comfortable on phones, and consistent with the rest of your site.
Keep one column for most forms. Single-column layouts are faster to scan than complex grids.
Use generous tap targets, readable labels and a strong button colour that matches your brand. Make the submit button text describe the action, such as Send message.
Finally, test on a real phone and with the keyboard alone. If you can reach every field with the Tab key and see where you are, your styling is working for everyone.
Frequently asked questions
Is the Ninja Forms Layout & Styles add-on required for styling?
No. You can style every part of a Ninja Forms form with the free plugin and custom CSS. The paid add-on mainly makes multi-column layouts and visual style changes easier, which helps if you build many complex forms or prefer not to write code.
How do I find my Ninja Forms form ID?
Go to the Ninja Forms dashboard and look at the forms list. Each form shows an ID, and the shortcode for the form also includes it. Use that number in selectors such as nf-form followed by the ID and cont to target one form.
Why does my Ninja Forms form look different from my theme?
Ninja Forms adds its own base styles when Opinionated Styles is set to Light or Dark. Switch it to None to let your theme control fonts and colours, or override the base styles with scoped CSS in Additional CSS.
Can I change the Ninja Forms submit button colour?
Yes. Target the submit wrapper and its input in Additional CSS, then set background, text colour, padding and a hover colour. Scope the rule to the form wrapper so the change applies only to Ninja Forms buttons and not to other buttons on your site.
Will my CSS survive Ninja Forms updates?
Yes, as long as you add it in Additional CSS, the Site Editor or a child theme rather than inside the plugin files. Class names are stable, but recheck your forms after major updates in case markup changes slightly.
Sources
- Styling Your Forms Ninja Forms
- How Do I Use Custom CSS? Ninja Forms
- How To Adjust Forms With Layouts And Styles Ninja Forms
- Ninja Forms WordPress.org Plugins
- View and change CSS Chrome for Developers
- :focus-visible MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


