Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tailwind CSS is overriding my responsive padding

I'm trying to add responsive padding to a component. Since Tailwind CSS is mobile-first, I'm defining my mobile padding to p-3 and screens at "md" and greater widths should use p-5. However, as you can see, the p-3 class is overriding the md:p-5 class. How can I fix this?

<div className="flex-column flex rounded-3xl bg-slate-100 p-3 md:p-5">

Developer tools image: enter image description here

like image 333
Yusuf Mert Çakmak Avatar asked Dec 21 '25 16:12

Yusuf Mert Çakmak


1 Answers

I have had the same issue; in my case, it was because I was using bootstrap and tailwind together.

Maybe using another CSS framework/library also causes this.

like image 108
Guillaume Caggia Avatar answered Dec 23 '25 09:12

Guillaume Caggia