theme is ignoring style.css theme is ignoring style.css
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

theme is ignoring style.css

Started by steve12ab, December 11, 2005, 04:31:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

steve12ab

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: http://www.jadedsociety.net/modules.php?name=Content&pa=showpage&pid=7

Paver

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.

steve12ab

Well I just looked into that and it looks ok to me.

Here is the template.html source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<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 $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="10" cellspacing="10" bgcolor="#669999">
<tr>
        <td valign="top" bordercolor="#FFFFFF" bgcolor="#003333" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td><a href="index.php"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}
                                </td>
                        </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                  {THEME_SELECT_LIST}</td>
                  </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
</table>
</body>
</html>


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?

Paver

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 http://www.jadedsociety.net/gallery/themes/classic/style.css 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:color : Black !important;

I'm not sure what else to say.  Check the web URL and check your cascading rules.

steve12ab

Ok that helps and it has led me to the problem.

But I still don't understand it.

I went to the stylesheet location @ http://www.jadedsociety.net/gallery/themes/classic/style.css.

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 http://www.jadedsociety.net/gallery/themes/classic/style.css 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?

Paver

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".)

Joachim Müller