----- 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
----- 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