Hello Isomorphic,
I'm trying to specify margin-left, margin-right CSS attributes on CSS class assigned to Label instance. This does not have effect though because you apply CSS class name to <TD> element which could not have margin. Specifying margin as the attribute of Label instance itself works but then I could not specify margins separately for left/right/top/bottom. How could I overcome this problem?
The code which demonstrates the problem:
CSS:
<style>
.myCanvas {
background-color:red
}
.myLabel {
margin-left: 10px;
border: 1px solid black;
background-color:green;
}
</style>
Code:
var theCanvas = isc.Canvas.create({
width: "300",
height: "300",
styleName: "myCanvas",
children: [
isc.Label.create({
styleName: "myLabel",
contents: "This is label"
})
]
})
theCanvas.show()
I expect label to be shifted related to canvas by 10 px from the left side. But this does not happen.
I'm trying to specify margin-left, margin-right CSS attributes on CSS class assigned to Label instance. This does not have effect though because you apply CSS class name to <TD> element which could not have margin. Specifying margin as the attribute of Label instance itself works but then I could not specify margins separately for left/right/top/bottom. How could I overcome this problem?
The code which demonstrates the problem:
CSS:
<style>
.myCanvas {
background-color:red
}
.myLabel {
margin-left: 10px;
border: 1px solid black;
background-color:green;
}
</style>
Code:
var theCanvas = isc.Canvas.create({
width: "300",
height: "300",
styleName: "myCanvas",
children: [
isc.Label.create({
styleName: "myLabel",
contents: "This is label"
})
]
})
theCanvas.show()
I expect label to be shifted related to canvas by 10 px from the left side. But this does not happen.
Comment