100% height left sidebar with dynamic right content - Bootstrap + Wordpress

后端 未结 1 1794
情书的邮戳
情书的邮戳 2021-01-02 02:32

I\'m making a website using Bootstrap and Wordpress. It\'s a 2-column layout - left sidebar, right content. The right content is dynamic and expands by infinite scroll. I\'v

相关标签:
1条回答
  • 2021-01-02 03:00

    This is working fine for me. Fiddle

    I set the min-Height to 500px. If you don't want minimum, remove it. It will work according to the height of your content in the content div. Like this Fiddle

      <div class="wrapper">
        <div class="sidebar hidden-phone">
        </div>
        <div class="content">
    
    
        </div>
    </div>
    

    and style

    <style type="text/css" >
        .wrapper
        {
            min-height:100%;
            width:100%;
            position:relative;
            background-color:Black;
            display:inline-block;
        }
        .sidebar
        {
            width:20%;
            top:0px;
            left:0px;
            bottom:0px;
            position:absolute;
            background-color:Aqua;
        }
        .content
        {
            min-height:500px;
            width:80%;
            position:relative;
            background-color:Gray;
            float:right;
        }
    </style>
    
    0 讨论(0)
提交回复
热议问题