M
me
[This is a Chrome-specific problem, but since their help forum is all
questions and
no answers, I thought I'd try and see if anyone here has any idea.]
When you change the left and right padding of a DIV from a javascript, you
would
expect the text elements inside it to be rendered and justified again;
indeed, this is
what IE and FF do; Chrome 5.0 however, does not. The text moves
horizontally,
but retains its width. (see the example below)
I have tried setting the right-padding before the left-padding, or setting
all four
padding values together, but to no avail. I could make an imperceptibly
small change
to the font size, but setting font size to 14.99px may have undesirable
side-effects.
Is there a better way to force Chrome to re-render the content of the DIV ?
Marc.
<HTML><BODY>
<DIV ID="MyContainer" STYLE="width: 360px; background-color: orange;">
<DIV ID="MyContent" STYLE="padding: 20px;" onclick="this.style.padding='20px
60px';">
<H1>Dynamic Padding Test</H1>
<P>Click anywhere in this rectangle to change the left and right padding
from 20 to 60 pixels.</P>
</DIV></DIV>
</BODY></HTML>