Gcobani Mkontwana

Gcobani Mkontwana

  • 1k
  • 1.2k
  • 87.9k

Div class aligning

Aug 17 2020 4:22 AM
Hi Team
 
 I need some help with aligning of my div, basically i have label and want @html.Editor(model=>model.CourseName) be next to this label. Somehow its not and need some help.
  1. <div class="row">  
  2.             <div class="col-xs-3">  
  3.                 <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">  
  4.                     Start New Course  
  5.                 </button>  
  6.             </div>  
  7.         </div>  
  8.   
  9.           
  10.         <!-- Modal -->  
  11.         <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">  
  12.             <div class="modal-dialog" role="document">  
  13.                 <div class="modal-content">  
  14.                     <div class="modal-header">  
  15.                         <h5 class="modal-title" id="exampleModalLabel">Start New Course</h5>  
  16.                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">  
  17.                             <span aria-hidden="true">×</span>  
  18.                         </button>  
  19.                     </div>  
  20.                         <div class="form-group row"></div>  
  21.                         <label for="CourseName" class="col-sm-2 col-form-label">CourseName:</label>  
  22.                         <div class="col-sm-8">@Html.EditorFor(model => model.CourseName, new { htmlAttributes = new { @class = "form-control", autofocus = "autofocus", placeholder = "CourseName" } })  // here it must next to the label and cant make it need help here please team.
  23.                              
  24.                         </div>  
  25.                         </div>  
  26.                         <div class="modal-footer">  
  27.                             <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>  
  28.                             <button type="button" class="btn btn-primary">Create Course</button>  
  29.                         </div>  
  30.                     </div>  
  31.             </div>  
  32.         </div>  
  33.   
  34.     </div>  
 

Answers (3)