SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    How to remove white space while "find and replace" to remove code in Dreamweaver?

    How to remove white space while "find and replace" to remove code in Dreamweaver?

    Hello. I just want to remove a single line of code from all my documents. Using find and replace works fine but it leaves the white space in its place. Is there anyway to remove that white space along with the line of code? Thanks!

  2. #2
    SitePoint Guru Jason__C's Avatar
    Join Date
    Oct 2009
    Location
    Racoon City
    Posts
    660
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by EricWatson View Post
    How to remove white space while "find and replace" to remove code in Dreamweaver?

    Hello. I just want to remove a single line of code from all my documents. Using find and replace works fine but it leaves the white space in its place. Is there anyway to remove that white space along with the line of code? Thanks!
    From personal experience with CS4, I have never heard of Dreamweaver having that feature, at least CS4. I would just run the page through a free editor that has that function. You would think Dreamweaver would do it anyway.
    Chuck Norris is so tough,
    mosquitos ask for permission before they bite him

  3. #3
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paste the text in as unformatted text. This prevents the white spaces in your document but it means having to reformat all of the content as you will lose all the bolding, bullets, paragraphs, line breaks and italics from the original document. Not fun on a large document!

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Eric,

    I have had to do this a bagillion times with different sites and have found a decent way that works for me. Consider the following:
    HTML Code:
    <div class="someDiv">
        ....some content...
    </div>
        <div id="removeDiv">
            ... more random content...
        </div>
    <div id="footer">
        ...footer content...
    </div>
    What I do to remove the div called "removeDiv" in this case, is highlight everything from the </div> of the div "someDiv" all the way through the opening of the "footer" div. Now paste that into your find window.

    in the replace window, simply replace it with the </div> from "someDiv" and the opening of "footer" div with no space inbetween.

    Choose replace all and make sure in the options of the find and replace are set to "source code" and entire current local site" and you should get something like:

    HTML Code:
    </div> <!-- from the "someDiv" -->
        <div id="footer">
    This works for me in dreamweaver CS4 and has worked great for the most part since Dreamweaver 8.

    hope this helps.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •