Home > Enterprise >  Tailwindcss with flexbox do not grow with horizontal description
Tailwindcss with flexbox do not grow with horizontal description

Time:11-18

I'm using tailwindcss. How can I make sure the label is not growing with the description?

<script src="https://cdn.tailwindcss.com"></script>

<div >
    <div>block</div>

    <div >
        <p>
            Title
        </p>
        
        <p >
            Description long long long long long long long long long long long long long 
        </p> 

        <div >
            Label...
        </div>
    </div>
</div>

CodePudding user response:

you can use w-fit or inline display styles to <div ...> Label... like inline or inline-block

<script src="https://cdn.tailwindcss.com"></script>

<div >
    <div>block</div>

    <div >
        <p>
            Title
        </p>
        
        <p >
            Description long long long long long long long long long long long long long 
        </p> 

        <div >
            Label...
        </div>
    </div>
</div>

  • Related