Hello everyone,
I really struggle with modifying CSS code as it doesn't over-rule. Sometimes it does and sometimes it doesn't and I have no clue why. So any help would be appreciated.
For example I tried to modify the banner using Header Manager and modifying CSS in LocalFiles Editor:
#theHeader div.banner {
background: transparent url('./local/banners/20140420-5354003619ab0.jpg') center center no-repeat;
height: 150px;
line-height: 138px;
font-size: 2.5em;
color: #fff;
text-shadow: 0 0 5px #000;
text-align: center;
}
#theHeader div.banner { <<<< NOT WORKING (part of local/css/custom-rules.css = part of custom theme)
height: 200px;
line-height: 188px;
}
#theHeader div.banner { <<<< NOT WORKING (part of local/css/rules.css)
height: 200px;
line-height: 188px;
}
It was also the reason I copied the theme to a custom theme, so I could modify the code itself.
Piwigo version: 2.6.2
PHP: 5.5.9-1ubuntu4 (Show info) [2014-04-25 05:51:40]
MySQL: 5.5.37-0ubuntu0.14.04.1-log [2014-04-25 05:51:40]
Offline
I also tried to add !important; but no joy either. Is this a problem where css files are generated by Piwigo?
Offline
Hi,
Starting with the simple things, do you reload your page after each change (i.e. ctrl-F5) to make sure your not using the cache?
A link to the page would help
Regards
Offline
Yes.. also tried in other browser (Firefox, Chrome and IE). Also tried to delete content of the /_data/combined folder, so it rebuilds.
If I change direct in the theme css, all works fine. I even do not have to do a shift-reload in the browser. Strange thing is some part can be changed without problem and some just not. Also lot of trouble with:
#imageToolBar, #imageHeaderBar {
margin: 10px auto;
width: 1060px !important;
}
#copyright {
background: #000000 !important;
}
PS .. if I check the /_data/combined and the css file, I do see both:
/*BEGIN local/css/blancmontxl-rules.css */
/*BEGIN local/css/rules.css */
Last edited by matthys (2014-04-25 16:45:16)
Offline
can't do anything without a direct link, to check by ourself
Offline
I solved one part of the problem. There was a strange character in the css file which I didn't 'see' from the browser but did notice when I checked on the server itself. All above the problem went ok, but all items after the problem was not applied.
However I notice another thing I cannot explain. Because of the problems with css I setup another test-site and with both the Header Manager enabled. Loaded a default banner and selected: Gallery title above image, You can customize the display by adding CSS rules to #theHeader div.banner
At site1 I got:
<div id="theHeader">
<a href="/~matthys/piwigo/">
<div class="banner">TEST Photo Gallery</div>
</a>
</div>
At site2 I got:
<div id="theHeader">
<h1>TEST2 Photo Gallery</h1>
</div>
So at Site2 I am missing the banner class and therefore all my css assigned to "#theHeader div.banner" is not working :-(
Offline
Please supply links to the site
Regards
Offline
Solved the problem.
Pity Header Manager is not that flexible. For test site1 I made a copy of the BlancMont XL theme and called it Custom theme, and that's why it's working. Header Manager has hard-coded a check for the BlancMont XL theme and the use of the header banner. This was the reason it was not working on my modified BlancMont XL theme for test site2. After changing the check in the Header Manager it was also working for test site2.
Offline