iframe and body margin or padding?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
dolphin
Hobby Astronomer
Hobby Astronomer
Posts: 25
Joined: 2019-04-04, 00:05

iframe and body margin or padding?

Unread post by dolphin » 2022-01-05, 09:45

I noticed at some point this year there was a change in the way Pale Moon rendered some legacy pages (that were done before css) that seems to have added a margin or padding to the html body.

These pages a year ago rendered the same in Pale Moon, Firefox, and Chrome, but at some point in the last year required adding a css style with body { margin:0px; padding:0px; } in order to render the same as they did before in Pale Moon. (This is not required in Chrome or Firefox still)

I noticed tonight that a couple of iframes were slightly cutting off their contents in Pale Moon now (but not in Firefox or Chrome) They didn't do that in Pale Moon a year ago but now have a slight added left and top margin or padding pushing them slightly out.

Just curious - is this a known intentional change in the way Pale Moon renders older html pages?

Is there an easy "fix" for old iframes in Pale Moon to not add extra margin/padding now (where I don't have easy control of the content of the iframe content itself to add new css to it.)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: iframe and body margin or padding?

Unread post by Moonchild » 2022-01-05, 15:47

Without providing any links or details there's no way to answer your questions.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
dolphin
Hobby Astronomer
Hobby Astronomer
Posts: 25
Joined: 2019-04-04, 00:05

Re: iframe and body margin or padding?

Unread post by dolphin » 2022-01-05, 23:12

Here is one example of a 20-year old html page that renders "the same as it always did" in Firefox and Chrome still, but that Pale Moon now shows a padding or margin on:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
 </HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#000099" TEXT="#000000" TOPMARGIN=0 BOTTOMMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> 
<img src=graph-e36.jpg width="100%" height="100%">
 </BODY>
</HTML>
I'm assuming Pale Moon is now ignoring the margin attributes in the BODY html tag. This seems to have changed at some point in Pale Moon; a year ago Pale Moon still rendered it the same as Firefox and Chrome which still show 0 margin 0 padding on the above legacy page.

User avatar
dolphin
Hobby Astronomer
Hobby Astronomer
Posts: 25
Joined: 2019-04-04, 00:05

Re: iframe and body margin or padding?

Unread post by dolphin » 2022-01-05, 23:27

Here is an example of the legacy iframe behavior. A year or so ago it displayed the same in Pale Moon as in Firefox and Chrome. Now in Pale Moon the iframe content is shifted down and to the right causing the bottom and right to be slightly cut off. In Firefox and Chrome it still displays as it used to in Pale Moon. This html is 20+ years old, so I'm just wondering if there is an easy fix to make it render this o-l-d html the same as it did before.

Parent Document

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE>iframe now showing margin/padding in pale moon</TITLE>
 </HEAD>

<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#000099" TEXT="#000000" TOPMARGIN=0 BOTTOMMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> 

  <IFRAME SRC=graph-36.html MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=800 HEIGHT=600>
 </BODY>
</HTML>
Iframe Source of graph-36.html

Code: Select all

<HTML>
<BODY BGCOLOR="#ffffff" TEXT="#000000">
<A HREF="/internal-url-removed/" TARGET="_top"><IMG SRC="800x600.jpg" ALT="" BORDER=0 WIDTH="800" HEIGHT="600"></A>
</BODY></HTML>

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: iframe and body margin or padding?

Unread post by Moonchild » 2022-01-06, 11:30

Can you find out which version of Pale Moon changed this behaviour?
You can find older binaries at http://archive.palemoon.org/palemoon/

As for a workaround, you can use userContent.css to set the margins to 0px either globally or on a per-site basis. Instructions for that can be found elsewhere on this forum and/or in documentation on the web.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
dolphin
Hobby Astronomer
Hobby Astronomer
Posts: 25
Joined: 2019-04-04, 00:05

Re: iframe and body margin or padding?

Unread post by dolphin » 2022-01-07, 04:13

Thanks very much.

This changed between 28.9.3 and 29.0.0.

28.9.3 had no extra margin on the iframes and 29.0.0 has the slightly cut-off iframes due to the extra new margin.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: iframe and body margin or padding?

Unread post by Moonchild » 2022-01-07, 11:46

Thanks, I'll make sure to investigate. Please use the workaround in the meantime.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
dolphin
Hobby Astronomer
Hobby Astronomer
Posts: 25
Joined: 2019-04-04, 00:05

Re: iframe and body margin or padding?

Unread post by dolphin » 2022-06-13, 22:03

I'm sorry - I should have replied to say thank you very much!

In this day and age, it's very neat to have the developer respond to your issue!

(And the workaround which I put into place in January for my own use following your instruction worked great in the meantime.)

Locked