manu overlap depending on body margin

81 views
Skip to first unread message

David W. Farmer

unread,
Aug 16, 2023, 2:03:35 PM8/16/23
to MathJax Users

On this page using MathJax 3

https://pretextbook.org/examples/sample-article/crc/section-fundamental-theorem.html

the MathJax sub-menus overlap, depending on the body margin.

If the page is narrow, everything is fine.

But when the page is wide, so that the content is left-right centered
because of

body.pretext {
margin: 0 auto 0 auto;
}

then the sub-menus overlap.

Pictures available here

https://groups.google.com/g/pretext-dev/c/tEUuRiuN0Y8

I see this in Firefox, Chrome, and Safari.

In the inspector I see that the structure of the menus is
sibling divs:

div.CtxtMenu_ContextMenu.CtxtMenu_Menu
div.CtxtMenu_ContextMenu.CtxtMenu_Menu

and each of those has a left and top style inline. When the page
is narrow, the two lefts differ by a small amount, which is what causes
the overlap.

I could not figure out how to change that inline style, nor why the
body margin made a difference.

I am pretty sure it is the body margin because disabling the margin
CSS shown above eliminates the problem.

Thank you for any help,

David

William F Hammond

unread,
Aug 16, 2023, 3:53:42 PM8/16/23
to mathja...@googlegroups.com
David W. Farmer writes in part, quoting someone's output:

body.pretext {
   margin: 0 auto 0 auto;
}

... as if there could be more than <body> ?? 

            -- Bill

William F Hammond
Email: gel...@gmail.com
https://www.facebook.com/william.f.hammond
http://www.albany.edu/~hammond/

𝑻𝒉𝒆 𝒕𝒊𝒎𝒆 𝒕𝒐 𝒔𝒂𝒗𝒆 𝒂 𝒅𝒆𝒎𝒐𝒄𝒓𝒂𝒄𝒚 𝒊𝒔 𝒃𝒆𝒇𝒐𝒓𝒆 𝒊𝒕 𝒊𝒔 𝒍𝒐𝒔𝒕.   -- 𝐊𝐞𝐧 𝐁𝐮𝐫𝐧𝐬



David W. Farmer

unread,
Aug 16, 2023, 5:20:44 PM8/16/23
to mathja...@googlegroups.com

Dear Bill,

Not sure if you were attempting humor.

It does make some sense because a lot of foreign css can be
at work in a PreTeXt document.

So we try to use the .pretext everywhere, to over-ride non-PreTeXt
selectors (which in many cases style on the tag and not a css class).

Regards,

David
> --
> You received this message because you are subscribed to the Google Groups "MathJax Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> mathjax-user...@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/mathjax-users/CAH_0fy7CiVg-V5e83UaLqn__osXq-3WJj0U0Vdw%3DoyuAsvv7Gg%40
> mail.gmail.com.
>
>

Sean Fitzpatrick

unread,
Apr 19, 2024, 12:12:22 PMApr 19
to MathJax Users
Since this is approaching nearly a year old, I suppose I can interpret this as "won't fix" on the MathJax end.

Is there anything we could do to adjust the PreTeXt CSS to keep the page centred, but also keep the MathJax menus working?

Reply all
Reply to author
Forward
0 new messages