Jump to content

How to make table with horizontal scrolling with tailwindcss 2.1?


Recommended Posts

I want to make table with horizontal scrolling for its content and
I try to use whitespace-nowrap class for table cells which have long content and
overflow-x-auto for all the table, like:

    <div class="editor_listing_wrapper_bix_width">

        <table class=" overflow-x-auto p-1 m-1 d2">
            <thead class="bg-gray-700 border-b-2 border-t-2 border-gray-300">
                <th class="w-1/12 py-2">Id</th>
                <th class="w-4/12 py-2">Name</th>
                <th class="w-4/12 py-2">Description</th>
                <th class="w-1/12 py-2"></th>


                <td class="whitespace-nowrap">
                    <small class="pl-2 pt-1">
                        ( Used in 2 ad(s) )

                <td class="whitespace-nowrap p-1">Laptops description Lorem ipsum dolor sit amet,
                    adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna

But looks likeĀ  horizontal scrolling is for all area, not for my table

Pls, take look at pen: https://codepen.io/sergeynilov/pen/eYgjVgM

I use tailwindcss 2.1.0.


Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.