You can use a border radius (4px is pretty standard around XenForo) with a background color and padding to make it blend in a little more. See code below:
HTML:
<div style="border-radius:4px; background-color:#ffffff; padding:10px;">
YOUR AD CODE HERE
<div>
Adjust above as necessary to get the look you want. As for matching width of surrounding elements that will be nearly impossible. Most sites and ads now are responsive. Meaning, depending on screen size, the ad displayed will also change in size (height and width).