allrounder
Oct 26 2009, 08:57 PM
Title says it all!
I use the <pre></pre> tags to get the exact bare bones layout I want yet the info is appearing on screen with extra lines either side of the text.
I've examined the html and can see no reason why this would be occuring. Thoughts?
allrounder
Oct 26 2009, 11:03 PM
here's a link to an example:
the detail of the scorecard is enclosed in the <pre></pre> tags...
Scorecardand here's one that does work (albeit a bit nicer looking!) -
Scorecard
pandy
Oct 27 2009, 01:47 AM
Come on now... You use PRE because you want to preserve whitespace, right? Yet you add blank lines in the source code.
CODE
Batsman How Out Bowler R M B 4 6 FOW
L Ebsary c. Coleman Farrell 18 30 24 2/41
P Merrilees run out (K Blackwell) 1 1 2 1/2
"The PRE element contains preformatted text. Visual browsers should render preformatted text in a fixed-width font, should not collapse whitespace, and should not wrap long lines"
http://htmlhelp.com/reference/html40/block/pre.htmlWhitespace is (mainly) spaces, tabs and carriage returns.
allrounder
Oct 27 2009, 05:10 PM
Hi Pandy
Thanks for replying but in my source code I DID not include blank lines - these appeared after the file was uploaded to the site.
I am well aware of what whitespace is but thanks for reminding me.
pandy
Oct 27 2009, 05:22 PM
They are there in the source now anyhow. If you were aware of the problem, I don't understand your question. Especially since you say "I've examined the html and can see no reason why this would be occurring.".
allrounder
Oct 27 2009, 05:54 PM
I can see they are there in the web version - but they are not there in my original code.
I want to know what is causing them to appear and how I can stop it.
pandy
Oct 27 2009, 05:57 PM
I don't know. Have you tried uploading the file again?
allrounder
Oct 27 2009, 06:11 PM
yes, several times
allrounder
Oct 27 2009, 06:20 PM
I've even saved the version appearing online and opened that up only to see no blank lines??
pandy
Oct 27 2009, 06:45 PM
I don't understand how that can happen since the blank lines are there in the source. How did you download it? View source?
allrounder
Oct 27 2009, 07:08 PM
I've tried fixing it two ways.
View source which shows the line breaks as you've found - I saved that, deleted the blank lines and reloaded. Same result.
I also did "save target as" but no blank lines showed in that when opened!
Christian J
Oct 27 2009, 07:53 PM
Some FTP programs may add extra newlines depending on the text editor used:
http://en.wikipedia.org/wiki/Newline#Common_problems
allrounder
Oct 27 2009, 08:13 PM
Thanks for that info.
I use either CoffeeCup's HTML editor or notepad to make quick changes - doesn't seem to matter which one I use.
pandy
Oct 27 2009, 08:53 PM
I assumed the other, correct, document was produced and uploaded in the same way. Was it?
What about binary mode then? Can you have turned that on by mistake in your FTP client?
allrounder
Oct 27 2009, 09:13 PM
The correct document was produced the same way.
I will check the FTP settings but I'm pretty sure it's done automatically...
pandy
Oct 27 2009, 09:27 PM
Hej, upload another document with a few lines in it and see if it happens to that too.
allrounder
Oct 27 2009, 10:03 PM
same thing happens...
allrounder
Oct 28 2009, 05:17 PM
does it help if I say the extra blank lines are appearing between every line of code but only the ones between the <pre></pre> tags are affecting the webview (as you'd expect)??
pandy
Oct 28 2009, 05:27 PM
I have no idea if something on the server can cause this. Seems far-fetched, but maybe it's possible.
Christian J
Oct 28 2009, 06:02 PM
QUOTE(allrounder @ Oct 28 2009, 11:17 PM)

does it help if I say the extra blank lines are appearing between every line of code
Sounds like the newline problem I linked to above.
pandy
Oct 28 2009, 06:41 PM
Yeah, but alrounder has used the same gear for these files as he did earlier when he didn't get the double line breaks. So what else could have changed?
allrounder
Oct 28 2009, 08:37 PM
and, more importantly, how do I fix it?!
pandy
Oct 28 2009, 11:07 PM
We won't know that until we know what it is.

Maybe a little talk with your host would be in place.
allrounder
Oct 29 2009, 12:40 AM
that's not possible, I'll have to solve it from my end
allrounder
Oct 29 2009, 07:21 AM
I've successfully loaded the file as it should appear with Filezilla so it looks like it is an issue with both net2ftp and CoffeeCup's HTML Editor
pandy
Oct 29 2009, 08:21 AM
How odd. I thought this problem was something of the past. I've never seen it myself actually. Good your problem is solved anyway and FileZilla is a great FTP client.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.