GWT: IE problem
Element tdElement = (Element)leftContentPanel.getElement().getChild(0).getChild(0).getChild(0); tdElement.setAttribute("style", "vertical-align: top; w开发者_如何学JAVAidth:100%;");
tdElement.getAttribute("style") returns : [object CSSStyleDeclaration] >>> ON IE "width:100%;..." ON FF
Doesn't work on IE why???????
The solution is to use element.getStyle() that returns a Style object.
Ex:
Element tdElement = (Element)leftContentPanel.getElement().getChild(0).getChild(0).getChild(0);
tdElement.getStyle().setWidth(100, Unit.PCT);
精彩评论