I need to create a celltable with 100% width and I need a relative width column and another two with fixed width.
I am doing it in this way:
table.setWidth("100%", true);
table.setColumnWidth(checkBoxColumn, 50, Unit.PX);
table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
table.setColumnWidth(emailColumn, 65.0, Unit.PCT);
as says in http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellTable.html
In FF it runs ok, but in Google Chrome but I can't get it working.
This is what I am getting http://www.under-code.com/cap-celltable.png
How can I fix this? Is there anything that I am doing wrong?
From the screenshot of your DOM, I notice you have a table inside of a table. The upper most table having no width, and the inner most table having width 100%. I believe the upper most table having no width is what is giving you trouble here.
By any chance are you using a VerticalPanel to layout your CellTable? It's underlying implementation is a table which can cause this sort of wonkiness.
If so, you can try:
1: Using a FlowPanel, SimplePanel, or HTMLPanel instead. Their underlying implementations are divs, which as a block level element will expand to fill the entire width of their parent.
2: Apply width=100% to your VerticalPanel