Skip to main content

All Questions

Tagged with
0 votes
0 answers
36 views

unable to get consistent layout with tailwind for relative container

I am trying to build a form layout in a NextJS project with tailwind CSS. here is the CodeSandbox Link for the issue. After running the code in sandbox, please click the button the view the resulting ...
Shubham Shaw's user avatar
0 votes
3 answers
31 views

How can I set an element to flex-1, and then prevent it from growing more than that and forcing scroll on its children?

I have a layout, header + content + footer. The header and the footer both have static heights. The container has flex flex-col and the content has flex-1. As long as the content inside the content ...
Mohammad Miras's user avatar
-1 votes
1 answer
41 views

Image contained in parent element using tailwind flexbox layout

I have a template layout using flexbox and tailwindcss. I am trying to superimpose svg onto an an image and confine them to the max size of parent container. The image and SVG need to be responsive. ...
srl's user avatar
  • 1
1 vote
2 answers
58 views

Position the div at the bottom

I want to fix this div at the bottom of my webpage, here is my react code: It's written in tailwind css but you can answer in normal css too I've tried using bottom property but it didn't work <div ...
ayesha's user avatar
  • 13
0 votes
0 answers
40 views

CSS style for implementing a floating menu that follows a draggable object

I am currently on a project of cloning canva using React and TailwindCSS. Say I have a structure like below: <div className='relative'> <div> <div>This is for the ...
MInH THiỆn's user avatar
0 votes
1 answer
25 views

Tailwind text padding and marging is not perfect on md

i have a problem with my code <motion.div variants={fadeIn('up', 'tween', 0.2, 1)} className="flex flex-col items-center justify-center lg:px-0 lg:py-0"> <div ...
Nacho Imperium's user avatar
0 votes
1 answer
71 views

Tailwind/CSS: Why my div is not fitting the width of the image but expanding to longer width?

My div (highlighted with background yellow) is expanding horizontally i.e., it's width is increasing. I think it is increasing to the full width of the image i.e., 800px + padding. How can I make sure ...
Sidharth Bajpai's user avatar
0 votes
0 answers
34 views

How to make container scrollable but fill horizontally with React and Tailwind

I want a dashboard with a top and side bar and then the content in the middle. I want the content to be scrollable but I want it to fill the available height. The only issue is that when I try to fill ...
ConnerWithAnE's user avatar
0 votes
1 answer
31 views

nested flexbox with text truncation [duplicate]

I have a set of nested flexboxes, each with a flex-1 div on the left and a fixed width div on the right. I want the inner-most left div to take up available space and truncate its text if necessary. ...
huxelot's user avatar
  • 13
1 vote
2 answers
54 views

Flexbox or CSS - n number of items per row without stretching the item. Using tailwind or CSS

Is there any way to force a certain number of items per row using flex box or any other way in CSS / tailwind, without stretching the item's width? and making them stick to left with same horizontal ...
Sidharth Bajpai's user avatar
0 votes
0 answers
39 views

How to vertically center the content section of a Tailwind PrimeVue Panel?

I am using the Tailwind PrimeVue Panel element with Aura presets. I want the content area to be vertically centered. I do not want the header to change, only the content area. I have tried putting ...
TinyTiger's user avatar
  • 2,172
1 vote
2 answers
55 views

How to make div at right side of horizontally justified (centered) element. In Tailwind or CSS

How to make this to be exact:- In the above there is a div justified at the center, and then another div next to it. The width of both the div's changes with animation and buttons. <script src=...
Sidharth Bajpai's user avatar
-3 votes
1 answer
29 views

Why does Flex causes multiple images to shrink?

I want to create a carousel of identically sized images using Tailwind CSS. I want to have 5 images next to each other that the viewer will be able to scroll left and right to see the images. When the ...
Juan Yeremia's user avatar
0 votes
2 answers
64 views

Split *ngFor data into 2 columns

I have this HTML: <div class="w-full flex justify-center"> <div *ngFor="let item of items" class="flex w-1/2"> <span>{{item.label}}</span> ...
Victoria Erdődy's user avatar
0 votes
1 answer
50 views

disable shrink of grid elements

I'm doing a pet project and I get a problem. I need two div's in the grid to have the same height on mobile devices and i want to add scroll when they overflow. But now the upper one squeezes the ...
yanballas's user avatar

15 30 50 per page
1
2 3 4 5
19