user1539137
user1539137

Reputation: 369

Setting CSS properties in GWT

I need to set the the -moz-box-sizing property on a widget through my GWT code. I don't want to do this through the .css file but need to do it in my java code. I tried

widget.getElement().getStyle().setProperty("mozBoxSizing", "border-box")

, but that doesn't work. Does anyone know how to convert -moz-box-sizing to the property camelcase property for GWT?

Thanks!

Upvotes: 0

Views: 277

Answers (2)

Cataclysm
Cataclysm

Reputation: 8538

Did you try with that widget.getElement().setAttribute("style","mozBoxSizing:border-box"); ?

Upvotes: 0

Patrick
Patrick

Reputation: 438

It seems MozBoxSizing would be the correct camelCase.

Upvotes: 1

Related Questions