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

Tailwind styling not working after navigating from another page in Next.js

I am building a site using Next.JS and tailwind.

On the homepage, the content in the wrapping divs in the project section displays in the centre.

However, when I navigate to my about page using the navbar link, and then return to the homepage, the content in the divs no longer displays in the centre (it displays to the left). This issue is not solved unless I refresh the page.

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

Any ideas how I can solve this issue please?

The deployed site can be viewed at:
www.catrinmentzoni.com

And the Github repo at: https://github.com/Babyoilrig/Catrin–Mentzoni-Portfolio

Thanks very much

>Solution :

When changing routes to your about page and back, the class of the child element under projects changes from col-span-3 content-center place-items-center md:mx-40 to ProjectSection_proj1Left__CTWEv. I guess that is why it breaks. So check if you set this somewhere (maybe even by accident).

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