3

I couldn't find this info anywhere, so I'm asking here. When I open CSS or HTML file, everything is in ONE huge, very long line... How can I fix this formating? I know I can do it manualy, but takes ages when files have arround 1500 lines :S

Thanks in advance for all answers!

/* table content style START */.pade {  margin-left: -19px;}.content {  color: #333;    text-decoration: none;  cursor: default;}.content a {   color: #333;    text-decoration: underline; cursor: default;}.part2{ width:900px; overflow:hidden;}.tablegray{ width:900px; overflow:hidden;}.content a:hover { color: #fff;    text-decoration: underline; backgroun.......
ProDraz
  • 1,283
  • 6
  • 22
  • 43

2 Answers2

4

try using this for css: http://www.lonniebest.com/FormatCSS/

Stephan
  • 1,639
  • 3
  • 15
  • 26
  • Works awesome, I believe W3C CSS validator is also usefull in such case :) – ProDraz Mar 12 '12 at 16:46
  • Still work wonders in 2021! Was using TextMate's build in "Reformat Text" on a huge one-liner CSS. That always leaves something broken somewhere and once the file gets lengthy it's near impossible to spot and fix. I just had a big one failed formatting in TextMate but this link gets it to work - 5000+ lines of CSS, flawless – KMC Jul 02 '21 at 13:12
0

If your using Visual studio as Editor then right click on the line and select "format document" or Cltr+k , Cltr+D

ipavankumarr
  • 27
  • 10