I'm continuing my messing about with Mochikit and am having a bit of trouble with getting a 2 column layout specified with DOM calls. If I use the code below in Firefox or IE6, I don't get the rightDiv next to leftDiv. rightDiv is below leftDiv. Examining the DOM in Firefox (with DOMInspector) it appears that the float assignment isn't getting put into the style for the two divs. Manipulating the DOM directly to add the float values makes the page render as expected.
Is there some aspect of setting the float part of style that I'm not getting?
TIA,
- Craig
=====
<html>
<head >
<title>Log Page</title>
<script type="text/_javascript_"
src="MochiKit/MochiKit.js">
</script>
<script type = "text/_javascript_">
var >{
var doc = currentDocument();
updateNodeAttributes(doc.body , {'style' : { 'margin' : '0',
'padding' : '0',
'background' : '#a7a09a',
'color' : '#000',
'min-width' : '750px' }});
var wrapDiv = DIV({'id' : 'wrapper'});
updateNodeAttributes(wrapDiv, {'style' : { 'background' : '#9c9',
'margin' : '0 auto',
'padding' : '0',
'width' : '750px' }});
appendChildNodes(doc.body, wrapDiv);
var headerDiv =DIV({'id' : 'header'});
updateNodeAttributes(headerDiv, {'style' : { 'background' : '#ddd' }});
appendChildNodes(wrapDiv, headerDiv);
var leftDiv = DIV({'id' : 'leftDiv'});
updateNodeAttributes(leftDiv, { 'style' : { 'background' : '#99c',
'float' : 'left',
'width' : '250px' }});
appendChildNodes(wrapDiv, leftDiv);
var rightDiv = DIV({'id' : 'rightDiv'});
updateNodeAttributes(rightDiv, { 'style' : { 'background' : '#c99',
'float' : 'right',
'width' : '500px' }});
appendChildNodes(wrapDiv, rightDiv);
appendChildNodes(rightDiv, "Here is the rightDiv.");
appendChildNodes(leftDiv, "Here is the left div. abcdefgh ijklmnopq rstuvwxyz ABCDEFG HIJKLMNO PQRSTUV WXYZ");
appendChildNodes(headerDiv, "Here is the header");
} // onLoad
</script>
</head>
<body onload = "onLoad()">
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---
