CSS seems not changing

Permalink
Hi all,

I am new to Concrete5 and make a little web site with it - so I started to develop my own little theme which is based on the standard theme.

I don`t know why, but if I make changes in the main.css it doesen`t change anything. Sometime it change it, or it changes my styles right after a while.

Does somebody had this problem before?

Thx,

 
JackRoyleMBS replied on at Permalink Best Answer Reply
JackRoyleMBS
If your default.php is linked to your main.css correctly I can only think of 2 reasons why this may be occuring. First is that your css is incorrect, e.g youve missed closing brackets, colons etc. Second is your browser is caching you main.css try making changes in your main.css then clearing your browser history/cache and then accessing your website, if the changes still havent been made upload your default.php and main.css to allow further assistance.

- Jack
StayArrr replied on at Permalink Reply
Hi again,

I cehcked this again and again and found some chache-files from zend in background, cleared it and then css was changing.

And after that I cehcked the cms settings in the dashboard and unchecked caching. That was the magic.

Thx for the hint ;)
aperson replied on at Permalink Reply
So the answer is to 1. Make changes to the main.css file. 2. Clear the browser cache. 3. Clear the c5 cache. 4. Refresh the page. 5. Close eyes and pray.

This seems like a bit much, and it takes a while. Also, if I use:

#id_block {
background-image: url(/images/snip.png) no-repeat;
}


I don't get an image at all. But if I use:
#id_block {
background-image: url(/images/snip.png);
background-repeat: no-repeat;
}


It works. Do *all* modifiers need to be on separate lines?
LucasAnderson replied on at Permalink Reply
LucasAnderson
You can turn caching off in your concrete5 settings. Your browser is your issue.

For your CSS, there is no repeat modifier for the property background-image, you're probably thinking of the shorthand background property.

http://www.w3schools.com/css/css_background.asp...
aperson replied on at Permalink Reply
Ah, very silly of me on the background property... I should have caught that.

One more thing on the stylesheets, is there any way to avoid having c5 prepend 'concrete/to/path/nasty/some' onto my url()'s inside?
jordanlev replied on at Permalink Reply
jordanlev
Yes. Instead of declaring stylesheets like this:
<link rel="stylesheet" type="text/css" href="<?php print $this->getStyleSheet('main.css'); ?>" />

do this:
<link rel="stylesheet" type="text/css" href="<?php print $this->getThemePath(); ?>/main.css" />
teknotica replied on at Permalink Reply
teknotica
I'm still having the same issue! it's incredible annoying I must say. Guys I used to love this CM but God this is just frustrating....non of your solutions work for me.

I created a new theme, I can see the css (the site is not caching -in theory-) but it doesn't change!!
StayArrr replied on at Permalink Reply
Which Browser do you develop with?
I found out that Chrome for example often chaches and much more often use files from chache instead of loading new ones. Its a settings thing. I like Webkit Browsers, so I use Safari in the meanwhile. Firefox is to memory-eating and IE (if I use windows), you know ;)
mhawke replied on at Permalink Reply
mhawke
I fought with this as well until I set up all my browsers to stop caching altogether. Here are a couple of resources to help you set up your browsers to bypass the cache.

http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache...

Chrome was the toughest until I followed this suggestion:

http://kelvyntaylor.blogspot.ca/2010/11/how-to-disable-google-chrom...
arik replied on at Permalink Reply
fwiw, I ran into the same issue and found out that the fault was actually with Apache -- not C5. What happened was that Apache was configured to using the Google PageSpeed extension. Once I commented out these following lines on httpd.conf, the issue resolved:

Include "conf/deflate.conf"
Include conf/pagespeed.conf
Include conf/pagespeed_libraries.conf
mhawke replied on at Permalink Reply
mhawke
Yes, this can be a problem. Some shared hosting plans enable Google PageSpeed by default but you can turn it off in the cPanel.