Question: I'm trying to line up these div's, but it seems to not be working correctly. 

the web address is - <http://www.minvera.com/hosting-price-sheet>

I need all the div's to line up because it's supposed to be similar to a table, but I hate tables. 

Any suggestions?

Answer: 
Here is a rather "radical" method if your document has only paragraphs with text (images or other elements will be lost). See [doc about element types here](https://developers.google.com/apps-script/reference/document/element)

(comments in code)

```
function removeNewLines(){
  var doc = DocumentApp.getActiveDocument();
  var text = doc.getBody().getText();// get a string
  var textMod=text.replace(/\n/g,'');// replace all \n with ''
  Logger.log(textMod);//optional check in logger
  doc.getBody().clear().appendParagraph(textMod);// empty the doc and apend new texr
  doc.saveAndClose();// save the result
}

```
I wanted to do the same thing (replace two new lines with a single new line). Ended up with the following as replaceText() doesn't accept \n for some reason.

```
function myFunction() {
  var body = DocumentApp.getActiveDocument().getBody();
  var text = body.editAsText();
  var text_content = text.getText();
  for(var i = 0, offset_i = 0; i < (text_content.length); i++){    
    if((text_content.charCodeAt(i)==10) && (text_content.charCodeAt(i-1)==10)){
      text.deleteText(i-1-offset_i, i-1-offset_i)
      offset_i++;
    }

  }

}

```