mathjax in ie6 with auto overflow

30 views
Skip to first unread message

Zou Hu

unread,
Mar 3, 2012, 8:52:33 PM3/3/12
to mathja...@googlegroups.com
Hi all, when I set the style of a div with "overflow:auto" in ie6, and use mathjax to typeset large code, the output looks wrong.  It maybe a bug of mathjax. Please see the attached screenshot and the following html for detail. Thanks.

<!DOCTYPE html>
<html>
<head>
<title>mathjax in ie6 with auto overflow</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/x-mathjax-config">
 MathJax.Hub.Config({
   tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
 });
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
</head>
<body>
<div style="overflow:auto;width:700px;height:300px">
<p>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</p>
<p>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</p>
<p>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</p>
</div>
</body>
</html>


ie6overflow.png

Davide P. Cervone

unread,
Mar 4, 2012, 7:07:28 AM3/4/12
to mathja...@googlegroups.com
It's actually an IE6 bug. Try adding "position:relative" to the
container DIV. I think that will do it for you.

Davide

> <ie6overflow.png>

Zou Hu

unread,
Mar 3, 2012, 6:12:23 AM3/3/12
to mathja...@googlegroups.com
Hi all, when I set the style of a div with "overflow:auto" in ie6, and use mathjax to typeset large code, the output looks wrong. Please see the attached screenshot and example. It maybe a bug of mathjax. Best wishes.


ie6overflow.png
ie6overflow.html

Davide P. Cervone

unread,
Mar 8, 2012, 9:29:29 AM3/8/12
to mathja...@googlegroups.com
As I mentioned above, adding 

position:relative

to the style for the DIV that has overflow:auto should take care of this.  It is not a MathJax bug, it is an IE6 bug, and this is the work-around for it.

Davide


On Mar 3, 2012, at 6:12 AM, Zou Hu wrote:

Hi all, when I set the style of a div with "overflow:auto" in ie6, and use mathjax to typeset large code, the output looks wrong. Please see the attached screenshot and example. It maybe a bug of mathjax. Best wishes.


<ie6overflow.html><ie6overflow.png>

Peter Krautzberger

unread,
Mar 8, 2012, 10:01:05 AM3/8/12
to mathja...@googlegroups.com
Davide,

That double post was actually my fault -- the message was caught in spam.

Sorry about that.
Peter.

Davide P.Cervone

unread,
Mar 8, 2012, 12:34:39 PM3/8/12
to mathja...@googlegroups.com
OK, thanks for the clarification.

Davide
Reply all
Reply to author
Forward
0 new messages