Skip navigation
RusticBohemian
Currently Being Moderated

Dreamweaver Keeps Making My Pages Large And Adding Spaces

Apr 14, 2012 7:59 PM

Hi guys.

 

I'm newly switched to Dreamweaver.

 

One weird problem I'm having is that dreamweaver keeps adding tons of extra blank spaces to my pages.

 

Check out this page, for instance: http://dl.dropbox.com/u/53677587/ArticleList.html

 

If you look at the source code, you'll see the article entries separated by many, many lines of white space.  When I paste it into my html editor, it shows as having 21,000 lines of code.

 

I've tried pasting the page content onto a fresh page but it keeps doing the same thing.

 

Other pages are like this too.

 

When I try to upload these pages, I'm told: "The size limit for an HTML page is 400 kB. The size of your "ArticleList.html" file is 434.55 kB.Large HTML files increase page load-up time, and are very user -unfriendly. Please reduce the size of your file and try again. "

 

Any idea what's going on and how I can fix it?

 

Thanks.

 
Replies
  • Currently Being Moderated
    Apr 14, 2012 9:47 PM   in reply to RusticBohemian

    Please tell us what this is

    ***z-menu-above.shtml***

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 14, 2012 10:24 PM   in reply to RusticBohemian
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 14, 2012 10:25 PM   in reply to martcol

    I meant MS Word, of course!

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 14, 2012 11:03 PM   in reply to RusticBohemian

    Like 'martcol' rightly said, if you're copying content from a 'rich text editor' such as MS Word or something similar you'll face this issue as Dreamweaver tries to retain as much as rich formatting as possible when you copy/ paste to the 'Design View' of Dreamweaver. This is a very bad practice when it comes to editing webpages.

     

    You could do one of the 2 things to get rid of this issue:

    1. Copy text from MS Word, paste it into a non-rich text editor such as Notepad (for Windows) or Smultron (for Mac). This will remove all formatting for you.

    2. You could copy paragraph by paragraph and paste it into Dreamweaver's 'Code View' instead of 'Design View'. This will only paste the text 'as is' and will clear formatting.

     

    To style the pages, use CSS. This is usually considered a good practice and will optimize your pageload times as well.

     

    Let us know if this works.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 15, 2012 12:15 AM   in reply to RusticBohemian

    Not sure why this has happened then.

     

    There is an expression you could use - doesn't work with Dreamweaver running on Mac OS Lion - its a known issue.

     

    But you could give it a shot:

    1. Click CTRL + F
    2. Select “Current document” in “Find in” (You can also select the folder if you have multiple files)
    3. Search in “Source code”
    4. Tick “Use regular expression”
    5. Type “[\r\n]{2,}” (without quotes) in “Find”
    6. Type “\n” (without quotes) in “Replace”
    7. Press “Replace All”

     

    If that doesn't work, Smultron can remove blank/ duplicate lines for you easily.

     

    Open the code with Smultron.Tools > Commands > Other > Remove Duplicate Lines - This will definitely work. I had your code with some 21,044 lines and after doing this in Smultron, I now only have 1618 lines.

     

    Hope this helps.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 15, 2012 12:17 AM   in reply to RusticBohemian

    To style the pages, use CSS.

     

    Do you mean that once I have the text in DW I should only use the in-program controls to make changes?

     

    By saying 'use CSS', I meant style all your elements using pure CSS. Do not rely on formatting from other 3rd party rich text editors. Copy and paste your content blank afresh into a new Dreamweaver document. Then style them using a CSS file that your main HTML/ PHP file links to.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 16, 2012 2:21 AM   in reply to RusticBohemian

    You're welcome. Glad I could help.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points