Set style on element not working in IE8
This doesn't work, the style text-align "right" doesn't take:
P({style:'text-align:right'},
"maybe maybe maybe this works?")
weird... can you try adding a semicolon at the end of the style string?
It's part of the HTML methods object, so can't. The whole thing looks like:
HTML({lang: "en"},
HEAD(
STYLE({type: "text/css"},
STYLE.on("body", {textAlign: "center", fontSize: 12, fontFamily:'Arial,Helvetica'}),
STYLE.on("h1", opacity(50), {background: "#000", color: "#fff"})
)
),
BODY(H1("Welcome to domo"),
P(O.x({id:'test'},styleLeft),
"does this work?"),
P({style:'text-align:right'},
"maybe maybe maybe this works?")
));
i don't think i understand what's going on here... as long as text-align:right makes it into the style attribute of the P element, this problem is likely outside of domo's jurisdiction.
(also, what is 0.x?)
O.x, is short for Object Extend. So it extends the object {id:'test'} to include the object defined by styleLeft. I haven't fully looked at your code but it would be convenient to be able to mix objects this way when calling any of your HTML5 methods. You can ignore that anyhow, the issue is in the next P method, the property style isn't making itself into the resulting document (IE of course). So give it a whirl, just take out the first P you see there and try in IE.