Reputation: 620
I'm having issues with using tailwinds "pb" class to add bottom space/padding to the html section area. I have forced a style to overwrite the spacing by adding a style tag with a padding bottom of 100px in the element. How can I use tailwind pb or mb to create the bottom space in the section tag instead of adding a style tag.
HTML(TailwindCSS)
**<section class="bg-formBgBlack flex" style="padding-bottom:100px;">
<div class="max-w-6xl px-5 mx-auto mt-10">
<h2 class="text-2xl font-bold text-center text-white pb-8 md:text-4xl">
Lorem ipsum dolor sit amet, onsectetur adipiscing elit
</h2>
<div class="flex container bg-white p-6 mx-auto rounded-lg max-h-full">
<div class="px-0 pt-8 pb-8 md:pt-16 md:px-32">
<span class="text-gray-700 uppercase flex text-left text-xs md:text-sm">Lorem ipsum dolor sit amet,
consectetur adipiscing elit.</span>
<span class="text-black font-bold flex text-left text-2xl md:text-2xl">Lorem ipsum dolor sit amet,
consectetur adipiscing elit.</span>
<span class="text-gray-700 flex pt-2 pb-2 text-left text-xs md:text-sm">Lorem ipsum dolor sit amet,
consectetur adipiscing elit.? <a href="#" class="no-underline text-signUpGreen">Lorem ipsum</a>
</span>
</div>
</div>
</div>
</section>**
Upvotes: 1
Views: 2167
Reputation: 2890
There is no utility class by default for 100px so you can just use arbitrary values, https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values
So the class to use in square bracket notation is pb-[100px]
.
If you will use that spacing in your project many times, you can also customize the spacing by configuring tailwind.conf.js
as described here, https://tailwindcss.com/docs/customizing-spacing
module.exports = {
theme: {
extend: {
spacing: {
'25': '6.25rem',
}
}
}
}
Upvotes: 1