Search code examples
javascriptjqueryhtmldompre

Removing a line inside a <pre> from the DOM


When I remove a line from a <pre> tag the rest of the lines below it don't move up like they would if using a standard <div> or any other element.

You can see an example of this at http://jsfiddle.net/NN6LC/

Has anybody encountered this issue before or knows how to resolve this?


Solution

  • You must remove the linebreak after the line too.

    http://jsfiddle.net/doktormolle/KgYyp/