Search code examples
csswidthtailwind-css

How to set width over 100% using Tailwind CSS


I need to set div width to 110%, but it doesn't seem possible with Tailwind CSS.

Their documentation only specifies a 100% value.

Class Properties
w-full width: 100%;

Solution

  • You can use JIT as w-[110%].

    JIT mode is default in Tailwind v3 and these values are called arbitrary values.
    In v2 you have to enable JIT mode.