Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I want to make my box offset, I tried putting the property but nothing happens. I use Tailwind & React

this is the code i use in my CallToAction.js, i put -top-28:

<div className="border text-white h-[226px] w-auto mb-[389px] bg-brand-quaternary border-brand-primary rounded-lg place-items-center grid grid-cols-4 -top-28">

i want to make it like this:
!pic 1]1

but i get this:
pic 2

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try adding mt-[-50%] instead of -top-28. Top work with position property like relative and absolute. You can also use -top-28 but you have to add relative or absolute class.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading