I don’t see anything that sticks out as causing the problem. Did you change anything else in the code?
If all you are trying to do is change the position and size of the elements, maybe go back to the original code and then modify the CSS to suit your needs.