Hi, I don't immediately know a solution, just an explanation:
I added cellspacing="0" and cellpadding="0" to your pure HTML layout's table element, and I get the same effect. The problem is, that the text input element gets a width of 100% + 3 pixels border (+ maybe additionally some padding). This results in more than 100% of the table cell's width, both in the UiBinder example, and in the pure HTML example. I think you could try wrapping the text input in another div that has some padding: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style> .padding { padding-right: 10px; } </ui:style> <g:HorizontalPanel width="100%"> <g:cell width="100%"> <g:FlowPanel stylePrimaryName="{style.padding}"> <g:TextBox width="100%" ui:field="inviteEmail"/> </g:FlowPanel> </g:cell> <g:cell> <g:Button ui:field="inviteButton" text="Invite"/> </g:cell> </g:HorizontalPanel> </ui:UiBinder> ... but maybe there are better solutions... hth Chris On Mar 6, 1:50 am, ailinykh <ailin...@gmail.com> wrote: > Hello, everybody! > I've problem with HorizontalPanel layout. > What I have is: > > <g:HorizontalPanel width="100%"> > <g:cell width="100%"> > <g:TextBox width="100%" ui:field="inviteEmail"/> > </g:cell> > <g:cell> > <g:Button ui:field="inviteButton" text="Invite"/> > </g:cell> > > </g:HorizontalPanel> > > I want to have a button on the right side and text input on the left > which automatically expands ands occupies rest of space . In pure HTML > this layout is: > > <table width="100%"> > <tr> > <td width="100%"> > <input type="text" style="width:100%"> > </td> > <td><button type="button">Invite</button></td> > </tr> > </table> > > But the picture I got is slightly different. For some reason text > fields overlaps button. > Any ideas what I do wrong? > > Thank you, > Andrey -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.