Announcement

  •  » Themes
  •  » The way to over-rule CSS using LocalFiles Editor? Not working for me

#1 2014-04-25 05:56:01

matthys
Member
2014-04-02
188

The way to over-rule CSS using LocalFiles Editor? Not working for me

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

 

#2 2014-04-25 14:52:59

matthys
Member
2014-04-02
188

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

I also tried to add !important; but no joy either. Is this a problem where css files are generated by Piwigo?

Offline

 

#3 2014-04-25 15:22:58

paul105
Member
2012-08-17
132

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

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

 

#4 2014-04-25 16:43:27

matthys
Member
2014-04-02
188

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

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

 

#5 2014-04-25 22:49:35

flop25
Piwigo Team
2006-07-06
7037

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

can't do anything without a direct link, to check by ourself


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2014-04-26 10:55:33

matthys
Member
2014-04-02
188

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

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

 

#7 2014-04-28 13:28:19

paul105
Member
2012-08-17
132

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

Please supply links to the site

Regards

Offline

 

#8 2014-04-28 22:49:06

matthys
Member
2014-04-02
188

Re: The way to over-rule CSS using LocalFiles Editor? Not working for me

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

 
  •  » Themes
  •  » The way to over-rule CSS using LocalFiles Editor? Not working for me

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact