Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > iLife

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Consolidating Stylesheets and Images

If you are using consistent style elements throughout the site other than those in Apple’s basic templates, you should create a single CSS file that will contain all your stylesheet information. You can use the contents of the <div> tags on the iWeb pages as a source for this information, and you should strip it out of those pages after you have it all put together elsewhere. The nice thing is that you should be able to do a fair amount of this by using global search and replace. It might still be a bear of a project at first, but each page should then be far more easy to edit.

The second thing is to consolidate all your image files into a single folder. Because you probably have images that are repeated across your site, consolidating will reduce the file size of your site and reduce the number of times a Web browser needs to download the same image from separate image files. In doing this, you’ll not only need to move the images themselves, but also update the relative paths used for each image. Thankfully, you can do this in a single search and replace process on each page (because each page uses the same folder for all its images), with a second global search and replace if you rename the image files.

You might also want to consolidate the JavaScript files that iWeb creates for mouseovers and photo albums (and possibly some additional JavaScript features of your own). Again, this code is typically the same on every page, provided that you used the same template theme across your site. So you can do a global search and replace to update the path to a single copy of this file and then delete the extras. However, if you do plan to use the photo album code, make sure that the copy of this file you keep comes from a photo album page.

  • + Share This
  • 🔖 Save To Your Account