Website Design Resources

Remove blank lines in Dreamweaver

Date posted: 15 October 2014
Posted in: Website development
Tags: , ,

Whenever I download an HTML or CSS file via FTP and open it in Dreamweaver, every other line is blank (I have absolutely no idea why).

The blank lines can be removed using a simple find and replace query:

  1. Go to Edit -> Find and Replace (or click CTRL + F).
  2. Choose the appropriate selection from the Find in dropdown.
  3. Choose “Source Code” from the Search dropdown.
  4. Type [\r\n]{2,} into the Find field.
  5. Type \n into the Replace field.
  6. Ensure Use regular expression is ticked.
  7. Press the Replace All button.

If in doubt, ensure your settings match the image below:

Remove blank lines in Dreamweaver

Remove blank lines in Dreamweaver