# Style in form input

**URL:** <https://forum.codewithmosh.com/t/style-in-form-input/25745>\
**Category:** HTML/CSS\
**Created:** [March 21, 2024, 6:33pm UTC](https://forum.codewithmosh.com/t/style-in-form-input/25745 "2024-03-21T18:33:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gae](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Gae](https://forum.codewithmosh.com/u/Gae)\
**Post date:** [March 21, 2024, 6:33pm UTC](https://forum.codewithmosh.com/t/style-in-form-input/25745/1 "2024-03-21T18:33:59Z")

</div>

Hi, I use python with django and for the frontEnd part html and css.  
I have this code:

```auto
        <label for="{{ form.AccessiNume.id_for_label }}"> Accesses No.: </label>
        {{ form.AccessiNume }} <style> input#id_AccessiNume {width: 55px;} </style> {{ form.AccessiNume.errors }}

```

I have read from several places that inline styling should not be used. But to change the width of the field iin input how can I do ?

Thanks

Translated with [DeepL.com](http://DeepL.com) (free version)

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [March 22, 2024, 6:15pm UTC](https://forum.codewithmosh.com/t/style-in-form-input/25745/2 "2024-03-22T18:15:15Z")

</div>

Hi,

Don’t you manage your style in CSS already ?  
If so, are you maybe using a framework that uses technics such as adding a dynamic identifier to styles such as ASP or Blazor CSS isolation ?

> **[ASP.NET Core Blazor CSS isolation](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/css-isolation?view=aspnetcore-8.0)**
>
> Learn how CSS isolation scopes CSS to Razor components, which can simplify CSS and avoid collisions with other components or libraries.

This can result in your changes in CSS not being applied because of misuse or misconfiguration.

Cheers.

---

<div class="post-metadata">

**Author:** ![onlyhasbi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/onlyhasbi/32/4608_2.png) [@onlyhasbi](https://forum.codewithmosh.com/u/onlyhasbi)\
**Post date:** [March 23, 2024, 3:48am UTC](https://forum.codewithmosh.com/t/style-in-form-input/25745/3 "2024-03-23T03:48:32Z")

</div>

Where is the input tag ?

---

<div class="post-metadata">

**Author:** ![Gae](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Gae](https://forum.codewithmosh.com/u/Gae)\
**Post date:** [March 23, 2024, 10:37am UTC](https://forum.codewithmosh.com/t/style-in-form-input/25745/4 "2024-03-23T10:37:22Z")

</div>

I apologize to everyone and especially to you who responded to me.  
I will move the forum to Django
