extra empty lines

HTML Source, Tables, CSS, JavaScript, and Embed/Object.

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

extra empty lines

Postby grahamtinley on Thu Jun 16, 2011 12:05 pm

Hi people,

I've a few searches but haven't found anyone with the same issue.

In my original html, for ul and li areas I typically have:
<div id="left" class="menu">
<ul>
<li><a title=
etc, etc

After changing anything on a page, it adds empty lines as in:
<div id="left" class="menu">

<ul>

<li><a title=

If the page is changed again, it adds another line:
<div id="left" class="menu">


<ul>


<li><a title=

How can I prevent this?

I need it keeping to the original so I can do a global replace when li items are removed or added.
grahamtinley
 
Posts: 1
Joined: Mon Dec 20, 2010 7:25 am
Country: United Kingdom (uk)

Re: extra empty lines

Postby BobCP on Thu Jun 16, 2011 2:49 pm

Please, we need to know what OS and Kompozer version you're using.
BobCP
Moderator
 
Posts: 1458
Joined: Sat May 26, 2007 10:03 am
Location: Connecticut

Re: extra empty lines

Postby agsone on Thu Jun 16, 2011 3:14 pm

Also, are you looking at the code using the KompoZer Source View or via a text editor? If the latter, which one and are you using Tidy?
agsone
Moderator
 
Posts: 1376
Joined: Mon May 21, 2007 7:33 pm
Location: Connecticut, USA
Country: Scotland (sp)

Re: extra empty lines

Postby gregtutor on Thu Jun 16, 2011 5:21 pm

While BobP and agsone ask pertinent questions, it's worth saying a little about KompoZer and its principles.

It's a WYSIWYG editor! By which I mean that it will always handle code its way - and that applies to both the HTML and CSS it generates. It is designed to generate code in the background while the user interacts through the WYSIWYG editor and dialogues.

While it does offer a SOURCE view, except for the most minor edits, it is unwise to use it as an editing screen. In any case it does not preserve code entered there and will re-write it, as it sees fit, by the time the file is re-saved.

When you refer to "global replace" I assume you are hoping to load many of the pages generated in KompoZer into a multi-file text editor in order, for example, to add an extra menu item to many pages, or alter a link that appears on many pages to a new location .

As you have discovered the slightest difference in technique when editing a page can have a significant impact on the code generated by KompoZer. The only way round this problem is to use an external tool to re-write the code generated by KompoZer. In my experience HTMLTidy is an essential tool and needs to be part of your KompoZer installation. Depending on your version of KompoZer, there are two different techniques for integrating it - hence agsone's questions.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3783
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)


Return to Advanced Design Q & A


Who is online

Users browsing this forum: No registered users and 1 guest