@Guiri Use percentage rather than pixels. Set your width to 96%, then your left and right margins to 2% each. Then set your height to something that looks ok on your sidebar. As most will just full screen on tablet, so doesn't matter on the height there.

You also don't really need a max-width as it will just fill the sidebar container.