I have started using jqMath for equations on my website and I need to be able to wrap these equations when their outer div has a fixed width.

<div id='math'>$$ x={-b±√{b^2-4ac}}/{2a} \text'A little bit of text that goes along with this.' $$</div>

CSS:

#math {
    width: 100px;
}

At the moment jqMath will just continue the text and equations in a long line, I need to make sure that the 'math' div will be a certain width and there will be no scrolling within it.

Any help would be greatly appreciated.

有帮助吗?

解决方案

If you want to wrap text, then you can try like this..

<div id="math">
    $$x={-b±√{b^2-4ac}}/{2a}$$ 
    <br />
    $$\text' A little bit of text that goes along with this.'$$
</div>

or simply do this

<div id="math">
    $$x={-b±√{b^2-4ac}}/{2a}$$ 
    <br />
    A little bit of text that goes along with this.
</div>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top