Hi, I've recently had to look at fixing a font spacing problem which involves changing our stylesheet. We have a few CSS files that we use, there is one in particular that I need to change to implement this fix.
I tested it on our Test environment fine, then went on to change the Live file but for some reason it is not taking effect. There haven't been any failed jobs in the Central Admin so I don't understand why it isn't using the new values I entered in the stylesheet.
It is definitely using the same stylesheet, I've used the developer toolbar, it just seems to be using the older version. I've checked in, published, approved, etc but no luck.
Anybody have any ideas please?
Ok, I've logged in with another site collection admin and they can change the file and the changes can be seen by that user. For some reason no other user is able to view the changes, not even other site collection admins.
There is no publish workflow setup and no approval so I don't understand why this is happening!
Just verify that you have CHECKED IN & PUBLISHED your CSS file to be accessible by other users,
if you have not published it, all other users will have the previous Published version of CSS applied.
Also, try to clear the cache of your browser & just reload the page, this should resolve your problem.
Thanks, Kunal Govani
Thanks but as I said in my first post I have checked the file in and published it. I don't understand why it is not working but I have found SharePoint Designer to be flaky for things like this at times. I've also tried clearing my browser cache and there's no change, it's very frustrating.
Ok, the solution is:
Check out the css file and open it in editor in sharepoint designer. press F5. Make sure it reflects your changes, if not, make your changes. save the file. and leave it where it is
now go back to browser. Go to the library where that css file in being saved. Check-in that file using browser and make sure you publish the major version of it.
Hopefully it will work
Thanks but unfortunately that did not work either. I also tried changing another stylesheet but I can't see any changes made either, maybe the Style Library has somehow become corrupt(?). Or maybe it's just a user problem?
- Edited by Dan Rooney Tuesday, April 03, 2012 3:52 PM
Also, when you reference your css file, add a querystring with a counter that you modify each time you make a change:
This will ensure that the browser fetches the latest version of the file and does not use the version in cache.
I begin to think you might be editing the wrong css file.
Use the developer tools of IE (Just hit F12 when on a sharepoint page) and see if the right css is loaded.
Click on the arrow in the developer bar and click on some item on the page that should have been altered by the css.
In the developer pane you will see all css files that are referenced, including in which order and what element is finally applied.
It could also be that some other css file is overriding your settings.
Willing to learn everything about Sharepoint there is to learn. My blog
I'm definitely editing the correct stylesheet, I also use the IE developer toolbar and I've made changes to the very stylesheet previously without this problem. I have found SharePoint/SharePoint Designer to be quite poor at times.
For example, recently one of my page layouts had become corrupted for some reason - two SharePoint controls were not rendering and I had to delete them and add them again in the markup to ensure they pulled through again and it worked. I've also found quirks with the workflows, in particular deploying them with certain users were a problem despite their full permissions.
The dev toolbar has Cache toolbar button - clear the cache and you will be fine if the latest file exists on server.
If above doesn't work then on the IIS go to the css file virtual directory and set cache expire option there its usually 1 year by default.
Thanks Yogesh, I've tried clearing the cache but it doesn't make a difference.
There shouldn't be any reason for me to play in the IIS since I've never had to for these CSS changes before, also I'm not sure exactly where/what I should change in the IIS.
Aaaargh!! I cannot update the new stylesheet now, the changes aren't taking effect even when checked in and published. There seems to be something wrong with me updating any CSS files in the Style Library. It's annoying!
It is possible at some point in the past there was content approval swtiched on and although there is no option to approve, maybe in the database it didn't work properly. I have no idea really.
I've just noticed something quite interesting that those familiar with the SharePoint table workings might be able to help me with....
If I go into the style library from the browser and click on the version history of the CSS file, then if I click on the latest version (date hyperlink) it opens the older stylesheet that it uses for the site.
However, if I download a copy of the CSS file then it has the complete CSS with my changes, i.e. the correct latest version of the file.
Why/how is this happening?!