The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML Script displays pages of space
wolf
post Nov 24 2020, 06:13 AM
Post #1





Group: Members
Posts: 5
Joined: 16-November 20
Member No.: 27,638



I have a page on my website http://www.1728.org/moons.htm
that displays a huge amount of unwanted space (roughly 3 pages) between one section of text and another.
(It 'splits' where it says 'calculator located here' and a table that says 'Planet / Moon Name / Moon Radius (km), etc')
I've used tables on many pages but I've never had a problem like this before.
Your help would be greatly appreciated. smile.gif
Thanks.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 24 2020, 06:43 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



This is a mystery. Below the point you pointed out something is injecting a load of BR tags. My browser's inspector shows them but they don't show when I view source. So I suspected the ad scripts. But removing all of them and also disabling JS didn't make the BR tags go away.

I don't get this. If it were something server side, some kind of include, the BR tags would show when viewing source. How can this happen if it isn't JS doing it? unsure.gif


Attached thumbnail(s)
Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 24 2020, 10:47 AM
Post #3


.
********

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



Interesting, I get nested FONT tags. unsure.gif

There are lots of HTML syntax errors, and when I removed the (real) BR elements between the table rows the gap disappeared for some reason.

Still doesn't explain where all the ghost HTML elements come from. unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 24 2020, 10:55 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Huh? Do you see font tags where I see BR? With the inspector? unsure.gif

CODE
when I removed the (real) BR elements between the table rows the gap disappeared for some reason.


No, that makes sense. Stuff between table tags bubbles upwards... You know, if you have word there it shows above the table. Why wouldn't BR do the same? I didn't notice them. I stopped looking when I saw the long column with BR tags with the inspector.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 24 2020, 11:06 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Removing the BR tags you found removed that column of BR tags from the inspector. So they bubbled up in the inspector too! How quaint. I used Iron BTW.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 24 2020, 12:18 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Wolf, the BR tags Christian spotted are your problem. Remove all of them.

You can't have anything between the tags that make up a table, no matter if it's text or other tags. Nothing goes there. All content must be placed in the TDs (or THs)

CODE
<table>
   <!-- Nothing goes here -->
   <tr>
      <!-- Nothing goes here -->
      <td>Everything goes here!</td>
      <!-- Nothing goes here -->
   </tr>
   <!-- Nothing goes here -->
</table>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 24 2020, 02:27 PM
Post #7


.
********

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



QUOTE(pandy @ Nov 24 2020, 04:55 PM) *

Huh? Do you see font tags where I see BR? With the inspector? unsure.gif

Yes, tested with Firefox and Vivaldi:

CODE
<font face="Arial"><font color="000066"><font size="4">

  

</font></font></font><font face="Arial"><font color="000066"><font size="4"><br>




</font></font></font>

The first FONT group has no BR, but subsequent ones appear to, didn't check them all. tongue.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 24 2020, 02:28 PM
Post #8


.
********

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



QUOTE(pandy @ Nov 24 2020, 04:55 PM) *

No, that makes sense. Stuff between table tags bubbles upwards... You know, if you have word there it shows above the table.

That's a relief, at first I suspected Google of circumventing my javascript blocker. wacko.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 25 2020, 12:52 AM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



The FONT tags are really strange!

In a way it's strange with the BR bubbling I saw too. I mean, what is the inspector really? A mix of View Source and how the browser displays the HTML and then some? I've noticed on occasion that they show inexplicable things before. But I don't remember the context, just that I gave up.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 25 2020, 01:58 PM
Post #10


.
********

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



QUOTE(pandy @ Nov 25 2020, 06:52 AM) *

The FONT tags are really strange!

I get them in all my browsers, including Opera12/Presto and IE11/Trident. Where did you only get BRs, in K-Mel?

QUOTE
In a way it's strange with the BR bubbling I saw too. I mean, what is the inspector really? A mix of View Source and how the browser displays the HTML and then some? I've noticed on occasion that they show inexplicable things before. But I don't remember the context, just that I gave up.

I don't know, but since the Inspector shows the same as the viewport rendering I guess it's some kind of processed version of the DOM tree. That still doesn't explain why tables "bubbles" those BRs, or where the nested FONT tags come from, though. unsure.gif

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 25 2020, 02:38 PM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



No, K-mel doesn't have an inspector. As I said above it was Iron.

Anyhow, the BR tags are at least there in the source even if not together like that, but how can they be converted to FONT? That's really crazy.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 25 2020, 06:38 PM
Post #12


.
********

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



QUOTE(pandy @ Nov 25 2020, 08:38 PM) *

No, K-mel doesn't have an inspector. As I said above it was Iron.

I have the attention span of a goldfish. cool.gif Pale Moon shows FONT elements too.

QUOTE
Anyhow, the BR tags are at least there in the source even if not together like that, but how can they be converted to FONT? That's really crazy.

Could the FONTs be part of the Shadow DOM, that's not supposed to be exposed (except by bugs)? But the linked page says such elements can't be styled with ordinary CSS, yet when I added CSS borders to FONT elements in the OP's HTML code the ghost FONTs were styled too.

I recall Darin(?) linked to an old page about ghost HTML over a decade ago, but can't find it now. Was that about the Shadow DOM too?


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
wolf
post Nov 25 2020, 08:56 PM
Post #13





Group: Members
Posts: 5
Joined: 16-November 20
Member No.: 27,638



I certainly appreciate all the work you folks have done.
I thought the answer (if it even exists) would be simpler but I guess not.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 25 2020, 09:47 PM
Post #14


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



But it is simple! It was how the browsers' inspectors reacted to it that was confusing to us.

Just remove all the BR tags you have after each </tr> in the table after the gap. They aren't allowed there and they show up in the way you see, creating the big gap.

Just a sample, There is a BR after each row.

<TR><TD>  Earth</TD><TD> Moon</TD><TD> 1,737.1</TD><TD> 384,399</TD><TD> 27.325582</TD><TD> BC</TD></TR><BR>

<TR><TD>  *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD></TR><BR>

<TR><TD>  Mars</TD><TD> Phobos</TD><TD> 11.1</TD><TD> 9,380</TD><TD> 0.319</TD><TD> 1877</TD></TR><BR>

<TR><TD>  Mars</TD><TD> Deimos</TD><TD> 6.2</TD><TD> 23,460</TD><TD> 1.262</TD><TD> 1877</TD></TR><BR>

<TR><TD>  *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD><TD> *****</TD></TR><BR>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 26 2020, 07:38 AM
Post #15


.
********

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



QUOTE(pandy @ Nov 26 2020, 03:47 AM) *

Just a sample, There is a BR after each row.

Yes, over a hundred. The easiest might be to use the Replace feature in a text editor, and replace each </tr><br> with just </tr>. Make sure to keep a backup in case something goes wrong.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 26 2020, 12:24 PM
Post #16


.
********

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



QUOTE(pandy @ Nov 25 2020, 08:38 PM) *

Anyhow, the BR tags are at least there in the source even if not together like that, but how can they be converted to FONT? That's really crazy.

Now I checked if those FONT colors and sizes existed in the source, and indeed here's a single one where it's not allowed:

CODE
<TABLE width=90% BORDER="1" BORDERCOLOR="#000000" CELLSPACING="2" CELLPADDING="3">
<font face = Arial><font color=000066><font size=4>
  

<TR><TD>  Planet </TD><TD>  Moon<BR>  Name</TD><TD>  Moon<BR>  Radius<BR>   (km)</TD><TD>  Orbital<BR>  Radius<BR>   (km)</TD><TD>  Period<BR>  Days</TD><TD>  Year<BR>  Disc</TD></TR><BR>

But why is it duplicated 179 times? wacko.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
wolf
post Nov 26 2020, 10:30 PM
Post #17





Group: Members
Posts: 5
Joined: 16-November 20
Member No.: 27,638



SUCCESSFUL !!!
Thanks to all of you for all that help!!! smile.gif

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 27 2020, 01:11 AM
Post #18


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



You are welcome. wink.gif

You have other errors too. It probably worth while for you to try to improve your understanding of HTML a little. Sooner or later errors cause problems in one way or another, as happened now.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

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

 



- Lo-Fi Version Time is now: 28th March 2024 - 05:53 AM