[Javascript] mozilla & doctype Bug
Laurent Muchacho
elmuchacho at gmail.com
Wed Aug 24 07:38:27 CDT 2005
Hi
I have a small problem I'm trying to simply change the width of a div with javascript like so
html:
<div id="myDiv" style="width:50px">
hello
</div>
javascript:
document.getElementById('myDiv').style.width = '100';
Usually this work fine crossbrowser in my code when I don't use any doctype but soon as I place a doctype in my html code firefox stop working and I can't change the width, height, left, top of my div. This behavior happen with any doctype applied to the html.
I know most of us will think let's remove the doctype and this is sorted but my page need to have a doctype as I'm using css position and if I remove it the display get all funny and the page doesn't validate any more.
I hope someone can help and sorry if this as already been discussed in the list I been away for little while from the list.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050824/ce025c78/attachment.htm>
More information about the Javascript
mailing list