- Instant help with your CSS coding problems

Set element width over 100% using Tailwind CSS

Question:
How to set element width over 100% using Tailwind CSS?
Answer:
<div class="w-[125%]">I'm 125% wide</div>
Description:

TailwindCSS has a lot of predefined width utility classes. However, sometimes you may need to set a custom value other than these. In this case, you can use arbitrary values. 
Use the following syntax w-[ANY_CSS_VALUE]

For example:

<div class="w-[123px]">Width 123px</div>
<div class="w-[150%]">Width 150%</div>

To use arbitrary values you need to activate JIT mode, but from TailwindCSS v3 onwards this is activated by default.

Share "How to set element width over 100% using Tailwind CSS?"
Interesting things
OpanAi's ChatGPT