I would like to add a container around the default [gallery] output. I don't want to modify any core files, and add unusual lines to my functions.php. How to do that? What's the most elegant method?
Well, since you don't want to edit core files (which is absolutely fine, and unnecessary) and also don't want to do it by means of PHP (meaning
functions.php, for instance), here's a jQuery approach:
$('div[id^="galleryid-"]').wrap('<div id="SOME_ID" class="SOME_CLASS" />');
BTW, you know there already is a container
div that you can hijack for CSS purposes, right?