It actually looked okay to me in Firefox 126.96.36.199, but I checked the validation, -42 'warnings'.
You got two "<head>" and two "<body>"s, deprecated and proprietary ("old" and "IE-only") code, no !doctype statement (this alone could account for any problems in IE, which is now in 'quirks mode' because it doesn't know what to do without proper !doctype)... See screenshot image for partial list of errors.
Get Firefox the browser, and next get "HTML-Validator by TIDY", the extention. Install it, run it. It has a 'clean up the code' button which, if there are no ERRORS, will correct all WARNINGS (which are 'error-lites', really, but potentially page-busting at that), and present you with 'cleaned code' to copy & paste back as the document.
This might however, make the document not look right in browsers... in which case, then, fixing it properly can ensue.
Until the 'warnings' are corrected, there really isn't any way to 'fix' the cross-browser differences that you cite.