Knowledge Base

Background images on my default theme only appear on the main page

Problem: You installed with one of the default EE themes.  When you view your main page everything looks fine, but if you go to a page such as your comments page then the background images don’t appear.


Solution: The problem here has to do with the way the background images are specified in the accompanying CSS (located in the “weblog_css” Template by default).  By default, images are referenced similar to this:

background-image: url('./images/theme_images/yourtheme/image.jpg');

The image is referenced with a relative path.  For the vast majority of people this works just fine.  Some people, however, may run into a problem where the images don’t appear on subpages.  In this case, you can change the CSS to refer to the images with an absolute path.  For instance:

background-image: url('/images/theme_images/yourtheme/image.jpg');

Note that the period at the beginning of the path was removed.  You’ll need to make sure that the absolute path is correct with respect to your base site directory.

Last Updated on Feb 27, 2007 at 09:56   ( Permalink )
Category: Templates, CSS & Design, Technical Issues, Troubleshooting