Page 1 of 1

Why the big gap in that page?

PostPosted: Wed Feb 29, 2012 5:31 pm
by Diego SahagĂșn
http://www.summitpost.org/view_object.p ... irm_post=7

I've already created an XTHML table with the data of the "Two thousanders in Sierra de Guadarrama" section. Do you know why there is such a big gap preceding the table :?: :?

Re: Why the big gap in that page?

PostPosted: Wed Feb 29, 2012 6:11 pm
by Baarb
I don't know the technical reasons but I usually find that putting <noformat> and </noformat> round tables gets rid of such excessive white space.

Re: Why the big gap in that page?

PostPosted: Wed Feb 29, 2012 7:15 pm
by Diego SahagĂșn
Yep Baarb, I've put the noformat tag and the gap has disappeared.

Thanks mate

Re: Why the big gap in that page?

PostPosted: Thu Mar 01, 2012 7:48 am
by rgg
The "technical reason" for big gaps is an SP thing, but it's quite simple, actually. Normally, a new line in HTML will show up as just one space, and in addition, multiple spaces are condensed to just one.

If that would also be the case on SP, it would be more work to create readable pages, so, on SP, every space and every new line that's put in, comes out as well. Now, upon creating a table in HTML, to make the HTML itself readable, you'll want something like this

Code: Select all
<table>
  <tr>
    <td>...</td>
    <td>...</td>
    <td>...</td>
  </tr>
...
</table>


There are lots of spaces here, and lots of new lines, and SP will show all of them, which creates a big white area!

A really cumbersome solution would be to create the table with something like this

Code: Select all
<table><tr><td>...</td><td>...</td><td>...</td></tr>...</table>


But that would be very inconvenient to maintain.

The <noformat> and </noformat> tags are not standard HTML, but specific to SP, and it means that whatever is between them, should be treated as HTML without the special SP treatment for spaces and new lines.


Mind you, if you do want a new line inside a such a <noformat> tag, for example, in a bit of text inside a table, you have to use proper HTML for that: the </br> tag.

Ciao, Rob