# A Label, TextField and a PasswordField walk into a FlexContainer - No Margin

**URL:** <https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 21, 2023, 10:06pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739 "2023-07-21T22:06:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r123](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@r123](https://forum.inductiveautomation.com/u/r123)\
**Post date:** [July 21, 2023, 10:06pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739/1 "2023-07-21T22:06:36Z")

</div>

Using a Perspective View and FlexContainers. All the other Perspective components seem to support adding a style value "margin" save for the PasswordField thus far. It just ignores the setting.

Not sure if I have a typo or some components just don't support margins.

Work with TextField:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/803b0920da237ca0cc3536c9d2eab066ec18b15c.png)

No work with PasswordField:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f287394330f743ec13d531b9a8191a24511ff43a.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 21, 2023, 10:23pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739/2 "2023-07-21T22:23:33Z")

</div>

Did you try including `!important`?

Did you view it in just the designer or the actual browser? {yes it can make a difference}

Have you inspected it with your browsers developer tools? Is a margin being applied from somewhere else? Where?

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [July 21, 2023, 10:31pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739/3 "2023-07-21T22:31:52Z")

</div>

It appears that the shorthand doesn't work for the password component, but these do:

- `margin-top`
- `margin-right`
- `margin-bottom`
- `margin-left`

I didn't inspect anything though, just tried a couple examples.

---

<div class="post-metadata">

**Author:** ![r123](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@r123](https://forum.inductiveautomation.com/u/r123)\
**Post date:** [July 21, 2023, 11:02pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739/4 "2023-07-21T23:02:30Z")

</div>

The PasswordField seems to work the same with "margin" or "margin-top". It's just that with only "margin-top" set, it is just doing the one margin so the PasswordField moves away from the top 15px but it's now outside the bottom of the FlexContainer and you get a scrollbar. If you do "margin-top" and "margin-bottom" they cancel each other out and it looks like when you use just "margin" or nothing, no change.

It's like there is a setting forcing it to be the same height as the FlexContainer.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [July 23, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/a-label-textfield-and-a-passwordfield-walk-into-a-flexcontainer-no-margin/76739/5 "2023-07-23T14:39:51Z")

</div>

> **[Perspective - Password Field 'containerStyle' property | Ignition Features...](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/perspective-password-field-containerstyle-property)**
>
> The Perspective Password Field component should have a 'containerStyle' property, similar to the Numeric Entry Field component.
