One of the more annoying things about theming Drupal sites is having
to wade through the staggering amounts of wrapping <div> elements and
containers. Some of these are are fairly easy to get rid of. Others
require you to override core templates.
I recently found a clean way to get rid of a couple of those. These two were introduced in Drupal 7, and you will probably find them on almost all Drupal 7 sites – they look like this:

Or in markup:
1 2 3 4 5 6 7 | |
Now, the last of these wrappers are actually useful, the rest stems from one of the changes in Drupal 7, namely that the main page content is now a block, that can be positioned on the page via Drupal’s block system.
Now, that’s a nice concept, but all the site I’ve seen do business as usual, and get around this inconvenience by creating a block region called “content” and sticking the content-block in there as the only thing, leaving the region and block wrappers as more DIV-spam in your site’s markup.
So unless you’re actually doing something different with the content block and/or region, you can just get rid of these extra wrappers by sticking the two following templates in your theme’s template folder:
1 2 3 4 5 6 7 8 | |
1 2 3 4 5 6 7 8 | |
Short and sweet :)