I am building a widget with UiBinder, and I need to have it enclosed in a <span />
but UiBinder only gives me <div />
. E.g. <g:HTMLPanel />
=> <div />
. HorizonPanel, FlowPanel, VerticalPanel also give out only <div />
.
Does any one know a solution?
Try this:
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:HTMLPanel tag="span">
<!-- your stuff -->
</g:HTMLPanel>
</ui:UiBinder>
You can keep using a <div>
but just add display: inline
to its CSS, which will make it display as though it were a <span>
.
Edit: fixed place at the end where I said 'div' but meant 'span'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With