Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: steve12ab on December 11, 2005, 04:31:02 am

Title: theme is ignoring style.css
Post by: steve12ab on December 11, 2005, 04:31:02 am
I'm trying to make my Gallery look like the theme I am using in the phpBB where the gallery resides.

I have been editing the files the the /theme/classic/ directory but no matter what changes I make to the style.css file when I upload the changes to the server and resfresh the page none of the changes take effect.

To make sure that I am not crazy I took the following steps:
-After backing up the style.css I deleted it from the server. Upon refreshing the gallery there were no visible changes and all the features worked fine.
-Again after backing up the style.css I uploded a file by the same name that was for a different theme and again there were no visible changes to the gallery after refreshing it.

Also note:
-When cycling through various themes that I have uploded from to the /theme/ directory from the theme option in the config page all the themes work and appear properly regardless of which one I choose. (Except of course the one I am editing which Is ignoring the style.css)

I am starting to think I am doing something wrong or I am totally missing something.

Why isnt the theme I select recognizing any of the changes I make to its corresponding style.css?

The gallery is imbedded into a page of my phpBB forum using imbeddedframe tags.
The page is located here:
Title: Re: theme is ignoring style.css
Post by: Paver on December 11, 2005, 04:43:06 am
Are you sure the link to the style sheet in template.html is the correct one?  When I set up a new theme based upon one of the default ones I forgot to modify the <LINK> tag and it was still pointing to the default theme's style.css.
Title: Re: theme is ignoring style.css
Post by: steve12ab on December 11, 2005, 05:41:33 am
Well I just looked into that and it looks ok to me.

Here is the template.html source:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<link rel="stylesheet" href="themes/classic/style.css" />
<script type="text/javascript" src="scripts.js"></script>
$Id: template.html,v 1.1 2004/06/11 09:20:08 tarique Exp $
<table width="100%" height="100%" border="0" cellpadding="10" cellspacing="10" bgcolor="#669999">
        <td valign="top" bordercolor="#FFFFFF" bgcolor="#003333" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <td><a href="index.php"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <td align="center" valign="top">

I didn't change the html pointers to style.css at all in the template.html. The only thing I changes in this file is the color options. They show when I publish the gallery just fine, but the style.css changes still fail to show up. Any other ideas?
Title: Re: theme is ignoring style.css
Post by: Paver on December 11, 2005, 07:19:29 am
I downloaded your style.css and put it on my gallery and it changed my gallery to look like yours (as expected).  The style.css URL is and I assume you are modifying the classic theme.  You could check this URL to make sure it matches what you upload (to make sure you're putting the file into the correct place).  It is recommended to avoid modifying the defaul themes and instead copy the closest theme to what you want to a new folder (named what you like) and modify that, but that's a separate issue.

Your file permissions on style.css are fine (since I can download the file), so I guess all that's left is CSS issues.  Maybe the changes you are applying are being cascaded away based on significance.  If you want to force a style element, you can place the tag "!important" on an element and that should  bump up that element into sight (in most cases).  For example:
Code: [Select]
color : Black !important;
I'm not sure what else to say.  Check the web URL and check your cascading rules.
Title: Re: theme is ignoring style.css
Post by: steve12ab on December 11, 2005, 12:44:52 pm
Ok that helps and it has led me to the problem.

But I still don't understand it.

I went to the stylesheet location @

I then went onto my ftp and downloaded the style.css at that spot on the server.

When I compared the two, they did not match?!?! How is that possible?!?!

The next thing I did was go back to the Firefox window where I was viewing and refreshed the page. All of a sudden all the value changes to the ones I had edited it to. The changes also took effect when I loaded the gallery.

When Coppermine draws my gallery, does it pull the style.css from cache? I think maybe that was the problem.

Anyway, now to begin the daunting task of figuring out what all those values are. Anyone have any pointers?
Title: Re: theme is ignoring style.css
Post by: Paver on December 13, 2005, 02:36:56 am
Coppermine doesn't cache style.css (or anything else), so it's not Coppermine's fault.  Firefox and most browsers cache web pages so you might have to refresh to see the new page.  In some cases, it might be necessary (or might be instructive) to clear out your browser's cache manually and try again.

Another thing that might have come up in your case is that some FTP clients won't overwrite files on the server by default.  Deleting the file first, like you mentioned, is a sure way to make sure the new file is really uploaded to the server.

To learn about style sheets, there are plenty of resources on the web.  I don't have any I use regularly, so I cannot recommend any particular one.  That's a separate question though and should go in a new thread if you want to ask for suggestions from people on this forum.

Have you solved your problem now?  (If so, we can mark this thread as "solved".)
Title: Re: theme is ignoring style.css
Post by: Joachim Müller on December 13, 2005, 08:24:56 am
Recommended CSS tutorial: