Element.getStyle() does not return any value in GWT
问题 My CSS file below sets width "50px" for style "myButton", and accordingly the element is correctly created with width 50px. The issue is managing the element from Java (GWT). The following lines: MyFile.java final Element box1 = DOM.getElementById("myButton"); String test=box1.getStyle().getWidth(); box1.getStyle().setWidth(100, Unit.PX); String test2=box1.getStyle().getWidth(); have as a result test="" and test2="100px" , and element is correctly resized to 100px. Why doesn't test have any