Search code examples
csstwitter-bootstrapvertical-alignmentborder-layoutvertical-text

Border layout with bootstrap


Is it possible to build a border layout with bootstrap, that centers the labels of the right and left borders, keeps the bottom at the bottom of the page and fills the content with all space left over in the center?

New to bootstrap, but even with the help of google I just came up with this:

div class="container">
<div class="row">
    <div class="col-xs-1">
        <div class="left-box">
            <div class="turn-left">left</div>
        </div>
    </div>
    <div class="col-xs-10">
        <div class="row">
            <div class="col-xs-12">
                <div class="top-box">top</div>
            </div>
            <div class="col-xs-12">
                <div class="content-box">content</div>
            </div>
            <div class="col-xs-12">
                <div class="bottom-box">bottom</div>
            </div>
        </div>
    </div>
    <div class="col-xs-1">
        <div class="right-box">
            <div class="turn-right">right</div>
        </div>
    </div>
</div>

https://jsfiddle.net/fbtw6/352

The result is not very convincing - what am I doing wrong?


Solution

  • See it this works for you.

    <div class="container">
        <div class="page-header">
            <div class="row">
                <div class="col-xs-1">
                    <div class="left-box">
                        <div class="turn-left">left</div>
                    </div>
                </div>
                <div class="col-xs-10">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="top-box">top</div>
                        </div>
                        <div class="col-xs-12">
                            <div class="content-box">content</div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-1">
                    <div class="right-box">
                        <div class="turn-right">right</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer class="footer">
        <div class="container">
            <p>sticky footer</p>
        </div>
    </footer>
    

    I used this example to assemble.

    Like this any better?