# Width with percentage not working

**URL:** <https://forum.codewithmosh.com/t/width-with-percentage-not-working/2180>\
**Category:** Uncategorized\
**Created:** [January 22, 2021, 12:21pm UTC](https://forum.codewithmosh.com/t/width-with-percentage-not-working/2180 "2021-01-22T12:21:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamzanisar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/hamzanisar/32/553_2.png) [@hamzanisar](https://forum.codewithmosh.com/u/hamzanisar)\
**Post date:** [January 22, 2021, 12:21pm UTC](https://forum.codewithmosh.com/t/width-with-percentage-not-working/2180/1 "2021-01-22T12:21:09Z")

</div>

as defined in lecture I’m adding width in view component with percentage sign but its giving error wdith:“50%”,

---

<div class="post-metadata">

**Author:** ![Anton2021](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/anton2021/32/1131_2.png) [@Anton2021](https://forum.codewithmosh.com/u/Anton2021)\
**Post date:** [March 21, 2021, 8:56pm UTC](https://forum.codewithmosh.com/t/width-with-percentage-not-working/2180/2 "2021-03-21T20:56:03Z")

</div>

Which course or lecture are you referring to here ?
