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
|
- [Dynapi-Help] Converting an external stylesheet.. Kasper Schnell
- Re: [Dynapi-Help] Converting an external stylesheet.. Richard Bennett
- Re: [Dynapi-Help] Converting an external stylesheet.. Jim
- Re: [Dynapi-Help] Converting an external stylesheet.. Richard Bennett
- Re: [Dynapi-Help] Converting an external stylesheet.. Kasper Schnell
- Re: [Dynapi-Help] Converting an external styleshe... Richard Bennett