G
Guest
Hi all...
I'm using CSS expressions to dynamically position DIVs on-screen,
using code like:
left:expression(document.body.clientWidth/2 - ckid_div_content.offsetWidth/2);
where ckid_div_content is a DIV containing (uh) some content.
The trouble I'm having is that when the doc is first loaded, I get
an error dialog stating that ckid_div_content isn't defined. Interestingly,
after that I can refresh (F5) the screen, but the error dialog doesn't
appear, which seems like a wierd cached-document interaction.
Now I know that in a <script> block you can set the DEFER attribute,
but <style> doesn't have this attribute, so how can I defer
recalculation of the expression until the DIV is loaded?
Regards,
mvsmith
I'm using CSS expressions to dynamically position DIVs on-screen,
using code like:
left:expression(document.body.clientWidth/2 - ckid_div_content.offsetWidth/2);
where ckid_div_content is a DIV containing (uh) some content.
The trouble I'm having is that when the doc is first loaded, I get
an error dialog stating that ckid_div_content isn't defined. Interestingly,
after that I can refresh (F5) the screen, but the error dialog doesn't
appear, which seems like a wierd cached-document interaction.
Now I know that in a <script> block you can set the DEFER attribute,
but <style> doesn't have this attribute, so how can I defer
recalculation of the expression until the DIV is loaded?
Regards,
mvsmith