Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change bootstrap columns width

how to expand top panels (marked as red) so as to be over the entire width of the page (marked as green)? All must have the same width.

And second and similiar problem. I need to add 7th table at the bootom. How to do it, so they all have the same width?

enter image description here

Online demo: bootply

My code is here:

<div class="container-full">
    <div class="row clearfix">
        <div class="col-md-3 column well">
            <h2>
                Heading
            </h2>
            <p>
                Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
            </p>
            <p>
                <a class="btn" href="#">View details »</a>
            </p>
        </div>
        <div class="col-md-9 column">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <div class="row clearfix">
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                        </div>
                        <div class="col-md-1 column">
                        </div>
                        <div class="col-md-1 column">
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-md-1 column">
                            <div class="panel panel-primary">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        Panel title
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    Panel content
                                </div>
                                <div class="panel-footer">
                                    Panel footer
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1 column">
                        </div>
                        <div class="col-md-1 column">
                        </div>
                        <div class="col-md-1 column">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="row clearfix">
                <div class="col-md-2 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-md-2 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-md-2 column">
                    <table class="table table-condensed table-bordered">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-md-2 column">
                    <table class="table table-condensed table-bordered">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-md-2 column">
                    <table class="table table-condensed table-bordered">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-md-2 column">
                    <table class="table table-condensed table-bordered">
                        <thead>
                            <tr>
                                <th>
                                    #
                                </th>
                                <th>
                                    Product
                                </th>
                                <th>
                                    Payment Taken
                                </th>
                                <th>
                                    Status
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Default
                                </td>
                            </tr>
                            <tr class="active">
                                <td>
                                    1
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    01/04/2012
                                </td>
                                <td>
                                    Approved
                                </td>
                            </tr>
                            <tr class="success">
                                <td>
                                    2
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    02/04/2012
                                </td>
                                <td>
                                    Declined
                                </td>
                            </tr>
                            <tr class="warning">
                                <td>
                                    3
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    03/04/2012
                                </td>
                                <td>
                                    Pending
                                </td>
                            </tr>
                            <tr class="danger">
                                <td>
                                    4
                                </td>
                                <td>
                                    TB - Monthly
                                </td>
                                <td>
                                    04/04/2012
                                </td>
                                <td>
                                    Call in to confirm
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
like image 650
breq Avatar asked May 07 '14 16:05

breq


People also ask

How do I change the width of a column in Bootstrap table?

Just add the . w-auto class to the table element to set an auto width to the table column. The width of the columns will automatically adjust to the content of the column. This means that it will always take up the minimum width required to present its content.

How do I change the size of a column in Bootstrap?

This is done by adding the class “col-SIZE-SIZE_TO_OCCUPPY”. For example, . col-md-4 which means take 4 columns on the medium-sized screens. If we stack multiple column classes on a single element we can define how we want the layout to look like on other screens and change the columns to rows as we want.

How do I change the grid size in Bootstrap?

Go to the Customize menu on Bootstrap website and choose your preferred size. In Less Variables -> Grid system you can find a form to input your preferred sizes. Then you can easily download the preferred grid. Hope this will help.

How do I make 4 columns in Bootstrap?

First example: create a row ( <div class="row"> ). Then, add the desired number of columns (tags with appropriate . col-*-* classes). The first star (*) represents the responsiveness: sm, md, lg or xl, while the second star represents a number, which should always add up to 12 for each row.


1 Answers

You can use col-fluid instead in bootstrap then with css specifying its width

HTML

<div class="row">
        <div class="col-fluid sidebar">
           <a href="#">log in</a>
           <a href="#">sign up</a>
        </div>
</div>

CSS

.sidebar{
    padding-left: 0px;
    background-color: #1f1f1f;
    min-height: 100vmin;
    width: 200px;
}
like image 124
priyanshu bindal Avatar answered Oct 14 '22 09:10

priyanshu bindal