Tailwind CSS: How to Create a Vertical Divider Line

Last updated on June 16, 2022 Pennywise Loading... Post a comment

The example below shows you how to create a vertical line that splits a web page into two equal parts.

Screenshot:

The code:

<body class="bg-amber-200 relative">
    <div class="absolute left-1/2 -ml-0.5 w-0.5 h-screen bg-gray-600"></div>
</body>

Further reading:

You can also check out our CSS category page for the latest tutorials and examples.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

You May Also Like