This code is directly from Google support. Please note that this will not work for AutoAds.
How to modify your responsive ad code - AdSense Help
If you find that our responsive ad code doesn't do everything you need, you may modify your ad code to better meet the requirements of your...