Assigning div width not working in IE?

Assigning div width not working in IE?

I'm just starting to learn about jQuery and had a question about assigning a page width.

The work in progress website is here:  http://leighmcd.com/blog/

The website is a horizontal scroll, the content on each page is dynamic in width so I'm trying to get the total and assign that to the .main class (which wraps all of the content).

  1. $(document).ready(function(){
  2. var contentWidth = $(".contentblock").width();
  3. var strNoDivs2 = $('.contentblock').length;
  4. blockContentTotal = contentWidth * strNoDivs2;
  5. var galleryWidth = $(".contentblockGallery").width() + 30;
  6. var strNoDivs = $('.contentblockGallery').length;
  7. blocksGalleryTotal = galleryWidth * strNoDivs;

  8. var totalCanvas = blockContentTotal + blocksGalleryTotal + 30;
  9. $('.main').css('width',totalCanvas);
  10. });


Those +30's are just for additional padding to the page but it doesn't seem to be working in IE. I thought it was before until I checked today. 

It seems like most of the pages are ok except for the one with a gallery, see:

Anyone have suggestions?