I think it's pretty safe to say that most people tackle both of your questions using the Cascading features of CSS.
For example, a typical view's HTML looks somewhat like this:
<div class="view view-NAME view-id-VIEWID view-display-id-VIEW-DISPLAY-id">
<div class="view-content">
<div class="views-row views-row-1 views-row-odd views-row-first">
<div class="views-field views-field-FIELDNAME1">
<span class="field-content">
<!-- field content here -->
</span>
</div>
<div class="views-field views-field-FIELDNAME2">
<span class="field-content">
<!-- field content here -->
</span>
</div>
</div>
<div class="views-row views-row-2 views-row-even">
<!-- etc etc etc -->
</div>
</div>
</div>
So, to your 1st question, Views already creates a div that wraps each row, that's the <div class="views-row ...">
one. You can style it per view by doing something like this:
.view-NAME .views-row {
/* styles for the rows div goes here */
}
And to your 2nd question, Views also already creates a <div>
that wraps all the rows, that's the <div class="view-content">
one. To style it for a particular view you can do something like this:
.view-NAME .view-content {
/* styles for the div wrapping your rows goes here */
}
Now, somewhat obviously, this is all dependent upon your theme. I am aware that some out there dislike all the markup Drupal by default creates and has overridden a lot of the standard templates to create leaner markup.
If that's the case in your instance, you should still be to instruct Views to add a class to each row if you want. This is accessed via the overall Style Settings (where you can also look at each Views template that is used for the particular view).
You could also instruct Views to add a class to each field wrapper. This is accessed from the config widget by each field.
ADDITION based upon commentary:
The Views template that creates the output of the view-content div is views-view.tpl.php
and the code in question is:
<?php if ($rows): ?>
<div class="view-content">
<?php print $rows; ?>
</div>
<?php elseif ($empty): ?>
<div class="view-empty">
<?php print $empty; ?>
</div>
<?php endif; ?>
so without changing this up, you're right, Views doesn't allow quick and easy preprocessing of the View to insert any other variables into that div's classes.
You could however use Views' preprocessing hooks to create an additional variable so you don't need to create lots of additional templates but rather just one more.
For example, copy views-view.tpl.php
to your theme (easiest) or module (requires special Views theme incantations :) and modify it along these lines:
<?php if ($rows): ?>
<div class="view-content <?php print $my_special_content_class; ?>">
<?php print $rows; ?>
</div>
<?php elseif ($empty): ?>
<div class="view-empty">
<?php print $empty; ?>
</div>
<?php endif; ?>
and then create a views preprocess hook along these lines:
function YOURTHEMEORMODULE_preprocess_views_view(&$vars) {
$name=$vars['name'];
$display_id=$vars['display_id'];
if ($name=='VIEWYOUWANT' && $display_id=='DISPLAYYOUWANT') {
$vars['my_special_content_class']='FOO';
} else {
$vars['my_special_content_class']=''; // so we don't have to isset() or !empty() it in our template :)
}
}
Save everything and clear your theme cache and now you should be on your way.
SECOND ADDITION:
Upon further thought, and a 'doh!' moment, you can do this without a template at all in preprocess like this:
function YOURTHEME_preprocess_views_view(&$vars) {
$name=$vars['name'];
$display_id=$vars['display_id'];
if ($name=='VIEWYOUWANT' && $display_id=='DISPLAYYOUWANT') {
$vars['rows']='<div class="FOO">' . $vars['rows'] . '</div>';
}
}
if you don't mind another wrapped div in there. And, I think you will need to/should do this in your theme instead of a module so you make sure this happens in the right order, eg, you want this to happen after Views is all said and done with things, and the theme hooks always run after the module hooks.