R
Ry Nohryb
So you've made unfounded inferences about a handful of modern
browsers? You should write a library.
Yes, I've done it already, I'm the author of My Library ! ;-)
So you've made unfounded inferences about a handful of modern
browsers? You should write a library.
Yes, I've done it already, I'm the author of My Library ! ;-)
Needs to reload the page. Try one of these?me said:Fortunately, the bug is easy to detect:
<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
function changePadding(that) {
that.style.padding = "20px 60px";
if (document.getElementById("MyWidthCheck").offsetWidth > 260) {
alert("Text not adapted; forcing render...");
that.style.display = "none";
setTimeout(function() {that.style.display = "";}, 0);
}
}
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="MyContainer" STYLE="width: 360px; background-color: orange;">
<DIV ID="MyContent" STYLE="padding: 20px;" onclick="changePadding(this);">
<H1>Dynamic Padding Test</H1>
<P ID="MyWidthCheck">Click anywhere in this rectangle to change the left
and right padding from 20 to 60 pixels.</P>
</DIV>
</DIV>
</BODY>
</HTML>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.