unwanted white space (extra lines) within <pre></pre> |
unwanted white space (extra lines) within <pre></pre> |
allrounder |
Oct 26 2009, 08:57 PM
Post
#1
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#2
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
|
pandy |
Oct 27 2009, 01:47 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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.html Whitespace is (mainly) spaces, tabs and carriage returns. |
allrounder |
Oct 27 2009, 05:10 PM
Post
#4
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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
Post
#6
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
I don't know. Have you tried uploading the file again?
|
allrounder |
Oct 27 2009, 06:11 PM
Post
#8
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
yes, several times
|
allrounder |
Oct 27 2009, 06:20 PM
Post
#9
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#10
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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
Post
#11
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#12
|
. Group: WDG Moderators Posts: 9,663 Joined: 10-August 06 Member No.: 7 |
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
Post
#13
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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. This post has been edited by allrounder: Oct 27 2009, 08:23 PM |
pandy |
Oct 27 2009, 08:53 PM
Post
#14
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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
Post
#15
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#16
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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
Post
#17
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
same thing happens...
This post has been edited by allrounder: Oct 27 2009, 10:03 PM |
allrounder |
Oct 28 2009, 05:17 PM
Post
#18
|
Newbie Group: Members Posts: 14 Joined: 26-October 09 Member No.: 10,146 |
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
Post
#19
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
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
Post
#20
|
. Group: WDG Moderators Posts: 9,663 Joined: 10-August 06 Member No.: 7 |
|
Lo-Fi Version | Time is now: 30th April 2024 - 08:29 AM |