In the following HTML, I want to display the two ContentPanes in the top region beside each other. In normal HTML this could be done using spans, or display: inline. How can this be achieved in Dijit?

<div>
<div data-dojo-attach-point="_containerNode" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="gutters: false, design: 'headline'">
    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
    </div>
    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
    </div>
    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'">
    </div>
</div>

有帮助吗?

解决方案

Wrap the two divs in another BorderContainer like:

<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="gutters: false, design: 'headline'">
    <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region: 'top', gutters: false">
        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'left'"> </div>
        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'right'"> </div>
    </div>
    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center> </div>
</div>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top