The caption has 2px padding on every side which causes it to be 4px longer on the right than the other elements
which causes an unnecessary scrollbar on the box containing the code.
This can be solved by setting the horizontal padding to 0 so that it only has padding above and below. You can still tell that the element is separate from the code (presumably the original intention of the padding) but now it doesn't cause the scrollbar to appear.
The caption has 2px padding on every side which causes it to be 4px longer on the right than the other elements
which causes an unnecessary scrollbar on the box containing the code.
This can be solved by setting the horizontal padding to 0 so that it only has padding above and below. You can still tell that the element is separate from the code (presumably the original intention of the padding) but now it doesn't cause the scrollbar to appear.