Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
center does not fill 100% width
posted

I try to create a border layout with only header/center/footer. I made following changes to your sample border-layout-markup.html:

  • in markups, remove left div and right div
  • in javascript, remove leftWidth, rightWidth. add showLeft: false, showRight: false.

so far so good. The layout is as expected.

But as soon as I remove all inner html from center div, the center div shrinks to a small area.

Why the center div does not fill 100% width in this case? I attached my modified html file for your review. 

Thanks.

border-layout-markup2.zip
Parents
  • 5105
    Offline posted

    Hi there,

    Change your markup to the following:

    <div id="layout" style="width:100%; height: 300px; display:block;">
    <div class="header">HEADER - some text here</div>
    <div class="footer">FOOTER - some text here </div>
    <div class="left"></div>
    <div class="center">
    <h3>CENTER AREA</h3>
    </div>
    <div class="right"></div>
    </div>

    Also include in the configuration: 

    leftWidth: "0%",
    rightWidth: "0%"

    Then the layout should work as you expect it.

Reply Children