While i was editing one of my css files, the power went out unexpectedly. After the power came back, i checked if the file was ok but it wasn't... it was corrupted, when opened in notepad it shows empty characters but the file size was not zero.
-
Could you try checking your temporary files depending on the browser used for testing?. Maybe an ok version of your css is still there. – CoderRoller May 15 '12 at 05:13
-
there is a .tmp file which is 2KB but it just shows empty and blank characters..theres not any ok version.. – Anita Sharma May 15 '12 at 05:20
-
In firefox the correct path to your temps can be found when you type: about:cache in the address bar. In IE the path is found typically on: C:\Documents and Settings\Your_User\Local Settings\Temp\Temporary Internet Files. There you will find some folders that might hold your css or files that could be it too. Also there is a hidden folder called Content.IE5 that might have the info you are looking for. – CoderRoller May 15 '12 at 05:29
-
Possible duplicate of [How To Recover CSS Rules From A Corrupted CSS File](https://stackoverflow.com/questions/44829325/how-to-recover-css-rules-from-a-corrupted-css-file) – Anita Sharma Aug 24 '17 at 16:28
3 Answers
if you use chrome or another browsers, just give recover option when it asks when you open first time after the power shutdown. After the recovering process go to the "show code" option, copy and paste the code.

- 303
- 1
- 4
- 13
-
when i restarted my browser(chrome) and opened the page the css was all gone and it says 'css not found'..is there any other alternative? – Anita Sharma May 15 '12 at 05:24
-
if you accidentally closed the tab just press ctrl+shift+t to show the closed tab. Then right click on page --> view page source. It shows the code including your inner style sheet. For external style sheet it is not possible. – Arun Kumar May 15 '12 at 05:31
-
If you already installed firebug plugin in your browser, it is easy to recover CSS also. To avoid this at next time, install firebug. – Arun Kumar May 15 '12 at 10:43
I faced the same issue recently and I found the solution. There is a corrupted file with extension .TMP
. To fix it, download Notepad++
then go to the .TMP
file and open the file with Notepad++
. You can find your all css
code in it. Just copy and paste into another blank css
file and include that file in your html
file. That's all.

- 2,568
- 8
- 26
- 39

- 11
- 1
-
I think she wrote on the comments that exactly this did not help and the tmp file was corrupted for her as well. I guess that depends on the timing of the power down. If it happens just in the moment the harddisk is writing the data it may happen that both files are corrupted. Just a guess. – Nitram Aug 03 '15 at 14:09
I suffered for the same issue just now...and I've got the solution...and its simple.
Install this software called: Mini Tool Power Data Recovery
Its free and after it is installed, select the "Damaged Partition Recovery" from the first screen and navigate to the location of the file that is corrupted and select each corrupted file or the whole folder through the checkbox.
And click 'Save' and select where to save the recovered files. That's all, you should now see the original not-corrupted file there.
Thanks to Mini Tool Power Data Recovery.
Useful links:
https://www.powerdatarecovery.com/data-recovery-resources/corrupt-files.html https://www.powerdatarecovery.com/free-file-recovery-software/how-to-recover-data-after-hard-drive-crash.html