locked
need help with alignment in a bootstrap RRS feed

  • Question

  • User569149469 posted

    Hi,

    I have a row like this

     <div class="form-group">
                                <div class="row">
                                    <div class="col-xs-2">
                                        <button id="Selectall" onclick="SelectAll();" type="button" name="Type" class="btn btn-danger btn-sm" value="Select All">Select All</button>
                                    </div>
                                    <div class="col-xs-2">
                                        <button id="Deselectall" onclick="DeSelectAll();" type="button" name="Type" class="btn btn-danger btn-sm" value="DeSelect All">De-Select All</button>
                                    </div>
                                    <div class="col-xs-6">
                                        <span>selected :</span><label id="lblSelRows" type="label"></label>
                                    </div>
                                    <div class="col-xs-2">
                                        <button id="Apply" onclick="" type="button" name="Type" class="btn btn-danger btn-sm" value="Apply">Apply</button>
                                    </div>
                                </div>
                            </div>

    but the alignment for selected and label is not correct can u pls help

    Wednesday, July 25, 2018 1:53 AM

Answers

  • User1724605321 posted

    Hi phmaspnet ,

    A quick way is to target the particular div and you set top margin to align it with the other elements :

    <div class="form-group ">
        <div class="row ">
    
            <div class="col-xs-2">
                <button id="Selectall" onclick="SelectAll();" type="button" name="Type" class="btn btn-danger btn-sm" value="Select All">Select All</button>
            </div>
            <div class="col-xs-2">
                <button id="Deselectall" onclick="DeSelectAll();" type="button" name="Type" class="btn btn-danger btn-sm" value="DeSelect All">De-Select All</button>
            </div>
            <div class="col-xs-6 toppadding">
                <span>selected :</span><label id="lblSelRows" type="label" title="123">asdasd</label>
            </div>
            <div class="col-xs-2">
                <button id="Apply" onclick="" type="button" name="Type" class="btn btn-danger btn-sm" value="Apply">Apply</button>
            </div>
        </div>
    </div>
    
        <style>
            .toppadding {
                padding-top: 8px;
            }
    
        </style>

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 25, 2018 2:57 AM