I deleted a clip and replaced it with another one. Suddenly the red line on top of the time line has a gap. The gap moves when I add new clips and where the gap is an old clip is shown even though I have deleted it from Elements. What to do?
It's not quite clear what you're saying.
A gap in the red line above the timeline is not a bad thing. It merely indicates that there's a segment of your video doesn't need to be rendered.
Welcome to the forum.
There will be no red line, if one has Clips, whose properties match those of the Project's Preset 100%. For instance, if you have a DV Project, and you have DV-AVI Clips, when placed on the Timeline, they will NOT have a red line. Now, if you add, or adjust an Effect, or use any form of overlay, such as a Title, PiP, etc., THEN you will get the red line.
This ARTICLE goes into more detail on the lines and also Rendering.