Skip to content

Contact

Mexico City, Mexico
Available for remote and on-site projects.

Professional networks

LinkedIn · GitHub · Email
Applied engineering, measurable results.

The widget lives in another iframe: why the CSS never reached it

· 3 min read · Samuel Torres

When the diagnosis from the migration session arrived, the key sentence was short: the expense row is an "Add Options" widget in its own 270-pixel iframe. The whole problem was there. The Requests form is a normal JotForm, but that row is not a form field: it is a widget, and in JotForm a widget lives in its own iframe. That means it has its own document, its own CSS and its own rules. The CSS we injected into the form does not cross that border. You can paint the form blue from top to bottom and the widget will keep its own colors, because for the browser they are two different pages, one inside the other.

That detail explains every symptom my HR colleague reported. The widget's label takes up almost the whole width of the 270-pixel iframe, so the text box ends up at 22 pixels, outside the visible area. The box was white because the form's CSS does not get into the iframe and the dark color-scheme paints a white background. The error looked like a red balloon with pink text and a pinkish panel. The focused row was almost white. The calendars in Vacation and Personal Day came out white. There were 38 pixels of horizontal scroll because of the Submit button line. And on mobile, First Name and Last Name were staggered. Seven symptoms, one architecture: the fix was in one layer and the pain was in another.

The technical lesson is simple, but it took me a whole day to really learn it: in JotForm, the form's "Inject Custom CSS" does not reach the widget. The widget has its own Custom CSS tab, which you open from the widget's properties gear. If you want to change the color, size or background of the expense row, you have to paste the CSS there, in the widget itself. The same goes for the date difference widget in Vacation: every widget is its own world, with its own CSS.

That is why the fix that migration prepared came in separate files. It was not a single CSS block: it was the main block conqr-fix-2026-11-27 for the form, plus one CSS for the "Add Options" widget in Expense Claim and another for the date difference widget in Vacation. Each one is pasted in its own place. The form's CSS goes in the form's Inject Custom CSS; the widget's CSS goes in the widget's Custom CSS tab. If you mix up the places, nothing changes, and you spend the afternoon wondering why the CSS "doesn't work".

The border you cannot see

The tricky thing about iframes is that you cannot see them. In the builder, the form looks like a single piece: the expense row is there, between the other fields, and it looks like just another field. Nothing tells you that this row is another page inside the page. That is why the first instinct is to keep pasting CSS into the form and get frustrated when the row does not change. The problem was not the CSS: it was the place where we were pasting it.

There is a rule I take from this and already apply to everything else: before fixing something, ask which layer it lives in. A field, a widget, an iframe, a page, a WordPress theme: each one has its own CSS and its own place where it is edited. If you do not know which layer the symptom lives in, you will fix the wrong layer, and the fix will be correct, complete and totally useless. The Expense Claim widget taught me that in 270 pixels. Get a quote on WhatsApp in 2 min

Samuel Torres Pichardo

Samuel Torres Pichardo
Software and cloud engineer in Mexico City, with about 3 years of professional experience.
About me · LinkedIn · GitHub · Contact

Got a project in mind?

Hire me: I'll help you build it.

Websites, online stores, custom systems and cloud. Tell me what you need and I'll tell you how I'd build it, what it costs and how long it takes.

  • Mexico City · remote

Menu

Español

[email protected]