If the compact layout is set to “fixed” then it does not matter where it’s placed, it will always stay fixed in one position anyways. I usually recommend placing it into the theme footer.php file, just before the closing body tag.
The issue here is the custom CSS, the one you are using is incorrect. For example the rules starting with these types of statements:
This doesn’t work like that in CSS language. Use exactly the one I suggested instead, it should work.Best,
If you like my products, don't forget to rate them on codecanyon :)