locked
DropDown RRS feed

  • Question

  • User-1499457942 posted

    Hi

      I have dropdown and i want that it should appear in Centre of Content page. No wit is appearing at the top left corner.

    <asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    
        <div class="dropdown">
            <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
                Dropdown
                <span class="caret"></span>
            </button>
        </div>
    </asp:Content>

    Thanks

    Thursday, July 26, 2018 5:51 AM

Answers

  • User-369506445 posted
    .center
    {
        left: 50%;
        ;
        top: 50%;
    }
    
    .center div
    {
        border: 1px solid black;
        margin-left: -50%;
        margin-top: -50%;
        height: 100px;
        width: 100px;
    }
    
    
    
    
    <div class="center">
    
    <div><div class="form-group">
                        <label for="select" class="col-lg-2 control-label">Selects</label>
                        <div class="col-sm-4">
                          <select class="form-control" id="select">
                            <option>1</option>
                            <option>2</option>
                            <option>3</option>
                            <option>4</option>
                            <option>5</option>
                          </select>
                         </div>
    
    
        </div>
    
    </div>
    
    
    
    
    
    

    Demo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 26, 2018 7:15 AM

All replies

  • User-369506445 posted

    Hi

    Please try below

    <div class="row">
    <div class="center-block">
       <div class="dropdown">
            <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
                Dropdown
                <span class="caret"></span>
            </button>
        </div>
        </div>
    </div>

    Thursday, July 26, 2018 5:58 AM
  • User-1499457942 posted

    Hi

      I am trying like this but still not working . Secondly i want on basis of User Selection particular function gets called from code behind

    <asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
         <div class="row">
    <div class="center-block">
    <div class="form-group">
    <label for="select" class="col-lg-2 control-label">Selects</label>
    <div class="col-sm-4">
    <select class="form-control" id="select">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    </select>
    </div>
    </div>
    </div>
    </div> </asp:Content>

    Thanks

    Thursday, July 26, 2018 6:58 AM
  • User-369506445 posted
    .center
    {
        left: 50%;
        ;
        top: 50%;
    }
    
    .center div
    {
        border: 1px solid black;
        margin-left: -50%;
        margin-top: -50%;
        height: 100px;
        width: 100px;
    }
    
    
    
    
    <div class="center">
    
    <div><div class="form-group">
                        <label for="select" class="col-lg-2 control-label">Selects</label>
                        <div class="col-sm-4">
                          <select class="form-control" id="select">
                            <option>1</option>
                            <option>2</option>
                            <option>3</option>
                            <option>4</option>
                            <option>5</option>
                          </select>
                         </div>
    
    
        </div>
    
    </div>
    
    
    
    
    
    

    Demo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 26, 2018 7:15 AM