{"id":2133,"date":"2010-11-07T18:05:30","date_gmt":"2010-11-08T01:05:30","guid":{"rendered":"http:\/\/www.ait-pro.com\/aitpro-blog\/?p=2133"},"modified":"2010-11-07T18:28:15","modified_gmt":"2010-11-08T01:28:15","slug":"remove-whitespace-in-dreamweaver-white-space-removal-dreamweaver","status":"publish","type":"post","link":"https:\/\/www.ait-pro.com\/aitpro-blog\/2133\/misc-projects\/website-design-tips-tricks-and-fixes\/remove-whitespace-in-dreamweaver-white-space-removal-dreamweaver\/","title":{"rendered":"Remove Whitespace in Dreamweaver &#8211; White Space Removal Dreamweaver"},"content":{"rendered":"<p><strong>Problem:<\/strong>\u00a0 Extra lines of whitespace appear in your PHP or HTML files in Dreamweaver after downloading your files from your server to your computer.\u00a0 Scroll to the end of this Dreamweaver whitespace fix to make sure this is the problem you are trying to fix &#8211; shows before and after Dreamweaver whitespace screenshots.<\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>In Dreamweaver either right mouse click anywhere in your code in Code View and\u00a0click Find and Replace, use Ctrl + F to launch the Find and Replace window, or click on the Edit menu and choose Find and Replace.\u00a0 All of these methods will launch the Dreamweaver Find and Replace window shown below.<\/p>\n<p>Click to enlarge image<br \/>\n<a href=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/find-and-replace-whitespace-dreamweaver1.png\" rel=\"lightbox[2133]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2135\" title=\"Find and Replace Whitespace Dreamweaver\" src=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/find-and-replace-whitespace-dreamweaver1-300x125.png\" alt=\"Find and Replace Whitespace Dreamweaver\" width=\"300\" height=\"125\" srcset=\"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/find-and-replace-whitespace-dreamweaver1-300x125.png 300w, https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/find-and-replace-whitespace-dreamweaver1.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Find in:<\/strong>\u00a0 Current Document should be selected unless you want to remove whitespace from several files all at once.<br \/>\n<strong>Search:<\/strong>\u00a0 Source Code should be selected.<br \/>\n<strong>Find:<\/strong>\u00a0 [\\r\\n]{2,}<br \/>\n<strong>Replace:<\/strong>\u00a0 \\n\u00a0<br \/>\n<strong>Options:<\/strong>\u00a0\u00a0Use regular expressions\u00a0should ONLY be selected (checked).<br \/>\nClick the <strong>Replace All<\/strong> button.<\/p>\n<p>Make sure that if you copy and paste directly from this page that you do not have any whitespace after [\\r\\n]{2,} in the Find: window.\u00a0 The blinking mouse cursor should be right after [\\r\\n]{2,} and not below it on a new line.\u00a0 Nothing bad will happen if you do not do this, but the whitespace will also not be removed from your files.<\/p>\n<p>If you have several Dreamweaver PHP or HTML files that you want to remove whitespace from or an entire website that needs to have whitespace removed from all files then I recommend that you only do one file first as a test before choosing other &#8220;Find in:&#8221; options like Entire Current Local Site, etc.<\/p>\n<p>To permamently fix this problem in Dreamweaver from reoccurring\u00a0each time you download and upload files to your server:<\/p>\n<p>In Dreamweaver click the Edit menu, click Preferences, select Code Format under the Category window, select LF (Unix) for Line break type as shown in the screenshot below.<\/p>\n<p>Click image to enlarge<br \/>\n<a href=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-line-break-type.png\" rel=\"lightbox[2133]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2136\" title=\"Dreamweaver Whitespace Line Break Type\" src=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-line-break-type-300x220.png\" alt=\"Dreamweaver Whitespace Line Break Type\" width=\"300\" height=\"220\" srcset=\"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-line-break-type-300x220.png 300w, https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-line-break-type.png 660w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Before <\/strong>&#8211; Shows a file in Dreamweaver where additional lines of whitespace have been added between the lines of code in the file.<\/p>\n<p><a href=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-before.png\" rel=\"lightbox[2133]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2142\" title=\"Dreamweaver Whitespace problem - Before\" src=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-before.png\" alt=\"Dreamweaver Whitespace problem - Before\" width=\"557\" height=\"381\" srcset=\"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-before.png 557w, https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-before-300x205.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/a><\/p>\n<p><strong>After <\/strong>&#8211; Shows that the whitespace between code lines has been removed in Dreamweaver.<\/p>\n<p><a href=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-after.png\" rel=\"lightbox[2133]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2143\" title=\"Dreamweaver Whitespace Removal - After\" src=\"http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-after.png\" alt=\"Dreamweaver Whitespace Removal - After\" width=\"553\" height=\"240\" srcset=\"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-after.png 553w, https:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/uploads\/2010\/11\/dreamweaver-whitespace-example-after-300x130.png 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/a><br class=\"spacer_\" \/><\/p>\n<p><br class=\"spacer_\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem:\u00a0 Extra lines of whitespace appear in your PHP or HTML files in Dreamweaver after downloading your files from your server to your computer.\u00a0 Scroll to the end of this Dreamweaver whitespace fix to make sure this is the problem you are trying to fix &#8211; shows before and after Dreamweaver whitespace screenshots. Solution: In [&hellip;]<\/p>\n","protected":false},"author":167,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[317],"tags":[318,319],"class_list":["post-2133","post","type-post","status-publish","format-standard","hentry","category-website-design-tips-tricks-and-fixes","tag-remove-whitespace-dreamweaver","tag-white-space-removal-dreamweaver"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts\/2133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/users\/167"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/comments?post=2133"}],"version-history":[{"count":0,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts\/2133\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/media?parent=2133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/categories?post=2133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/tags?post=2133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}