I go back on the subject because I am currently pulling my hair out on this problem.
I tried to solve the problem with the code you gave us, but it does not work.
For the layout I use separate containers. I also add a borders to my widgets.
Is there a possibility to solve the problem and everything is aligned?
I’m sorry for my bad english, I’m French 🙂