문제

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