Method 1: Unfiltered text
When setting up the header and footer in your view, select Global: Unfiltered text. For the header enter <div class="something">
and for the footer type in </div>
.
If you then override the default views-view.tpl.php, stripping out everything except
<?php print $header; ?>
<?php print $rows; ?>
<?php print $footer; ?>
... you should achieve output similar to:
<div class="something">
<div class="views-row views-row-1"></div>
<div class="views-row views-row-2"></div>
</div>
Method 2: Use attachments
This might be ideal if editing the header and footer through the Views UI isn't important, but you want some flexibility in the output that wraps around your rows; for example, if you wanted it to be dynamic.
Override the default views-view.tpl.php so that it looks like this:
<?php print $attachment_before; ?>
<?php print $rows; ?>
<?php print $attachment_after; ?>
In a custom module you would then implement hook_views_pre_render():
function MODULENAME_views_pre_render(&$view) {
$header_str = '<div class="something">';
$footer_str = '</div>';
if ($view->name == 'your_view_name' && $view->current_display == 'your_display_name') {
$view->attachment_before = $header_str;
$view->attachment_after = $footer_str;
}
}
(Remember to clear the cache after adding the function.)
Method 3: Simple template override (simplest but least flexible)
Override the default views-view.tpl.php and simply replace all of the mark-up with
<div class="something">
<?php print $rows; ?>
</div>
Hope that helps!
A couple of links that might be useful: