All I can tell you about text alignment is two things.
1) it suck rocks
2) I have found that putting the content into a table with the width and
height of the table set to the width and height of the layer (I do this via
function wich take the HTML(or text) + the object).
and alignment set to center...
----- Original Message -----
From: "Pieter Van Waeyenberge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 8:29 AM
Subject: [Dynapi-Dev] Netscape problem: incorrect CENTERING
> Hello,
>
> Im new to DYNAPI2 development, and i have a stupid problem:
>
> In the code below, i
> - create a main layer (navBarLyr)
> - add a child to it (foo)
> - add some html to the child WITH a style: text-align:center
> - add the main layer to dynapi.document
>
> BUT
> - When i set the width of the child, after i added the main layer to
> dynapi.document, the HTML is centerd vis-a-vis the main layer, not vis a
vis
> foo!!!
>
> --> this does not happen when i set the (foo) size BEFORE adding to
> dyanapi.docuemnt/
>
>
> MY QUESTION:
> -- is it me, or the DYNAPI
>
> thnx,
> pieter.
>
>
> <html>
> <head>
> <Script language="Javascript" src="../src/dynapi.js"></script>
> <Script language="Javascript">
> DynAPI.setLibraryPath('../src/lib/')
> DynAPI.include('dynapi.api.*');
> DynAPI.onLoad=function()
> {
> navBarLyr=new DynLayer()
> navBarLyr.moveTo(5,5)
> navBarLyr.setBgColor('#ccff00')
> navBarLyr.setSize(300, 300)
>
> foo=new DynLayer()
> navBarLyr.addChild(foo)
>
> foo.setBgColor('#ccffcc')
> foo.setHTML('<div style="text-align:center;">test</div>')
>
>
> // - Add main container to the document
> DynAPI.document.addChild(navBarLyr)
>
>
> foo.setWidth(200)
> }
> </script>
> </head>
> <body><!--form><select><option>ds</select></form--></body>
> </html>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
---
Outgoing mail is certified Virus Free by AVG Free Edition
http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 1/25/01
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev