GWT forced height HTMLPanel

Posted by Nils on Stack Overflow See other posts from Stack Overflow or by Nils
Published on 2010-05-18T13:07:29Z Indexed on 2010/05/18 13:11 UTC
Read the original article Hit count: 408

Filed under:
|
|
|
|

Hello,

I'm developing a GWT project, and I encountered a problematic cross-browsering problem.

When using firefox, there are problems with the display of all the pages. I found the reason why : In UIBinder, each of my pages are wrapped by a "g:HTMLPanel" : at start and at the end of the xml file, to wrap the content of all the pages

When doing this, the generated code of the panel goes like this :

div style="width: 100%; height: 100%; ....

The problem is that "height : 100%". If I remove it with firebug, the display is perfect. So my goal is to programatically remove that generated 100% height.. But no way to do it ! I tried everything : setHeight, setSize, working on the Element itself with getElement().methods()... I tried to do things like style.clear(), everything that could have a chance to work.. But in the generated code that "height: 100%" will ALWAYS be there. If I set it's height to "50%" or "50px" it has no effect at all.

I even tried to give it an ID, then with pure javascript to change it's style, but no solution either..

Note : I'm sure that I'm working on the right element : adding a styleName, for example, works well.

Any idea ?

Your help would be really appreciated, I have no clue of how to remove this bit of generated code, and I've been looking for hours already :(:(:(:(

Best regards,

Nils

© Stack Overflow or respective owner

Related posts about gwt

Related posts about uibinder