I don't do a lot of front-end stuff, but for this, you need a scripting language as the width's will vary depending on the tables' width. HTML alone cannot do this for you.
You need Javascript/JQuery or PHP for this. Personally, i'd use PHP to determine the needed width values as i'm primarily a PHP guy, but for you, you should try JQuery.
For example, for JQuery, try something of this sort:
PHP Code:
<script>
$(document).ready(function(){
var thewidth = $('#MyTable').width();
//Then add width to header and footer
$('#myheader').width(thewidth);
$('#myfooter').width(thewidth);
}
//Then you can apply this width to the header and footer
<script>
Try something along those lines. JQuery really makes work easier

. Less code, more logic packed in.