Thank you for your quick response. This saved me hours of debugging.
Yours
Kasper
----- Original Message -----
Sent: Wednesday, June 20, 2001 8:27 PM
Subject: Re: [Dynapi-Help] Converting an external stylesheet..

There are three things I know work, only the first is supported by NS4, and even then not if objects become nested to deep.
get a style sheet:
<STYLE TYPE="text/css">
<!--
.testClass {
 color: green;
 font-family: arial;
 font-size: 26;
 background-color: yellow;
 }
-->
</STYLE>
 
Then either: 1)
 
myLayer=new DynLayer(null,10,50,50,50,'green')
myLayer.setHTML('<span class="testClass">This is a span inside a DynLayer with class="testClass"</span>')
DynAPI.document.addChild(myLayer)
 
Or 2):
 
myLayer=new DynLayer(null,10,50,50,50,'green')
myLayer.setHTML('This is plain text inside a DynLayer with class="testClass"')
DynAPI.document.addChild(myLayer)
myLayer.className = "testClass"
//This ony works after a dynlayer as been added to the document.
 
Or 3):
 
myLayer=new DynLayer(null,10,50,50,50,'green')
myLayer.setHTML('This is plain text inside a DynLayer with the css altered.')
DynAPI.document.addChild(myLayer)
myLayer.css.padding="4px"  
myLayer.css.borderWidth="2px"
myLayer.css.borderColor="lightsalmon"
myLayer.css.borderStyle="solid"
 
As stated the last to don't seems to work in Ns4.(or not always)
 
Cheers,
Richard Bennett
 
[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.53)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi
----- Original Message -----
Sent: 20 June, 2001 17:15
Subject: [Dynapi-Help] Converting an external stylesheet..

Can anyone please  tell me the syntax for converting an external stylesheet into a dynLayer. Is it something like: myDynLayer=new DynLayer("MyExternalCSS")  ??
Does the imported DynLayer contains the same properties as those set in the .css file??
 
Yours
Kasper

Reply via email to