The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V  1 2 >  
Reply to this topicStart new topic
> unwanted white space (extra lines) within <pre></pre>
allrounder
post 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?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post Oct 26 2009, 11:03 PM
Post #2


Newbie
*

Group: Members
Posts: 14
Joined: 26-October 09
Member No.: 10,146



here's a link to an example:

the detail of the scorecard is enclosed in the <pre></pre> tags...Scorecard

and here's one that does work (albeit a bit nicer looking!) - Scorecard

This post has been edited by allrounder: Oct 26 2009, 11:05 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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. biggrin.gif

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. happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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.".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post Oct 27 2009, 06:11 PM
Post #8


Newbie
*

Group: Members
Posts: 14
Joined: 26-October 09
Member No.: 10,146



yes, several times
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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??
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allrounder
post 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)??
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 28 2009, 06:02 PM
Post #20


.
********

Group: WDG Moderators
Posts: 9,663
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 30th April 2024 - 08:29 AM