What coding are you attempting to use for your header? We use the header includes here and on numerous other sites without "breaking" mobile capabilities.
When inserting 3rd party (non-stock) coding into the header includes you'll need to make sure that your code is mobile capable; UBB.threads does not check that any code added is responsive (that's up to whomever develops the coding that you're inserting).
I have an article "
Adding a Logo to UBB.threads" which discusses adding a responsive logo to the top of your forums utilizing the HTML includes if you need a springboard.