One trick ive been using recently to deal with CSS issues is ask ChatGPT, its good. I give it my html and CSS and ask it to straighten that out for me. And as a backend dev to get a personalize answer its pretty amazing, literall