Search code examples
twitter-bootstrapcsstwitter-bootstrap-3liferay-theme

Stretching color column above the container to the bottom of the screen bootstrap


I need to pass the background of the column above the container until the end of the screen. As I can do with bootstrap and is responsive? I am now doing with a width but my scroll appears.

I attached a photo

enter image description here

<div class="portlet-layout row-fluid">
         <div class="container">
             <div class="col-sm-9">
                <div class="row-fluid portlet-column" id="column-2">
                    $processor.processColumn("column-2", "portlet-column-content portlet-column-content-first")
                </div>
            </div>
             <div class="col-sm-3 no-float">
                <div class="portlet-column portlet-column" id="columnaColor-3">
                    $processor.processColumn("columnaColor-3", "portlet-column-content portlet-column-content")
                </div>
                 <div class="portlet-column portlet-column-last" id="column-4">
                    $processor.processColumn("column-4", "portlet-column-content portlet-column-content-last")
                </div>
             </div>
         </div>
    </div>

#columnaColor-3{
    background: #2e373c;
}

Solution

  • The .col-* and the .container makes : padding-right: 15px; padding-left: 15px; I just added a rule to the column you want to remove this with: margin-right:-30px

    ps: I changed the sm to xs so you could see more clearly the changes in small screens.

    UPDATE

    if in case you are placing a log long (continuous) texts; you can break the text with:

    div{
        word-break: break-all;
    }
    

    #columnaColor-3{
        background: #2e373c;
        color:red;    margin-right:-30px
    }
    div{
        word-break: break-all;
    }
    .container{
        background: green;
    }
    #column-4{
        background: blue;
        margin-right:-30px
    
    }
    #column-2{
        background: white;
    }
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
    <div class="portlet-layout row-fluid">
             <div class="container">
                 <div class="col-xs-9">
                    <div class="row-fluid portlet-column" id="column-2">
                                            $processor.processColumn("column-2", "portlet-column-content portlet-column-content-first")
    
                    </div>
                </div>
                 <div class="col-xs-3 no-float">
                    <div class="portlet-column portlet-column" id="columnaColor-3">
                        $processor.processColumn("columnaColor-3", "portlet-column-content portlet-column-content")
                    </div>
                     <div class="portlet-column portlet-column-last" id="column-4">
                        $processor.processColumn("column-4", "portlet-column-content portlet-column-content-last")
                    </div>
                 </div>
             </div>
        </div>