Trying to position my date range picker across one row - html

When I select the date range option from my dropdown button, the date range options appear on top of each other (see image below). I would like for them to appear in the same row. One option I tried was playing with width, in both pixels and percentages, and when I added it, the entire card stretched to to the right. Does anybody know why this is happening?
This is how it normally looks prior to selecting "Date Range" from the dropdown menu.
When I select "Date Range", this is how it appears. Would like for it to be on one row, instead on top of each other.
When I play with the width property in CSS, the card stretches to the right, which is what I don't want.
<div class="report-card-i report-card-i-height" style="position: fixed; z-index: 10; background-color: #fff; float: unset; top: 80px; padding-left: 100px; padding-right: 85px;">
<h1>ABC Corp - Summary</h1>
<div class="col-lg-3 text-center">
#{
<select onchange="updateDates(this, null, null, null )">
<option value="0" selected></option>
#for (int i = 1; i < #Model.droplist i++)
{
var tempValue = i;
<option value="#tempValue">#Model.droplist.ElementAt(i)</option>
}
</select>
}
</div>
<div class="col-lg-8" id="dateRange" style="display: none; width:1px">
<div class="col-lg-2">
<div class="input-group date" id="divFrom">
<div class="form-line">
<input id="startDate" name="startDate" type="text" class="form-control" style="background-color: inherit; width: 85px" placeholder="dd/mm/yyyy" value="#Model.StartDate">
</div>
<span class="input-group-addon">
<i class="fa fa-orange fa-calendar"></i>
</span>
</div>
</div>
<div class="col-lg-2">
<span class="font-13 text-muted div-center">to</span>
</div>
<div class="col-lg-2">
<div class="input-group date" id="divTo">
<div class="form-line">
<input id="endDate" name="endDate" type="text" class="form-control" style="background-color: inherit; width: 85px" placeholder="dd/mm/yyyy" value="#Model.EndDate">
</div>
<span class="input-group-addon">
<i class="fa fa-orange fa-calendar"></i>
</span>
</div>
</div>
<div class="col-lg-2">
<button id="btnTest" class="btn-orange fa-orange btn-sm" onclick="updateDateRanges()" style="margin-left: 10px">Submit</button>
</div>
</div>
<br />
<br />
<div class="fa-orange m-t-10 m-b-15 m-l-80">
<div class="row col-lg-12">
<div class="col-sm-2 col-xs-2 text-left">
</div>
<div class="col-sm-2 col-xs-2 text-left">
<h4>Number of Deliveries</h4>
</div>
<div class="col-sm-2 col-xs-2 text-left">
<h4>Deliveries per day</h4>
</div>
<div class="col-sm-2 col-xs-2 text-left">
<h4>Gross Amount Due</h4>
</div>
<div class="col-sm-1 col-xs-1 text-left">
</div>
<div class="col-sm-1 col-xs-1 text-left">
<h4>Monthly Total</h4>
</div>
<div class="col-sm-1 col-xs-1 text-left">
</div>
<div class="col-sm-1 col-xs-1 text-left">
<h4>YTD Total</h4>
</div>
</div>
</div>
</div>

There was a structural issue. Try this
<div class="row">
<div class="col-lg-4 text-center">
#{
<select onchange="updateDates(this, null, null, null )">
<option value="0" selected></option>
#for (int i = 1; i < #Model.droplist i++) { var tempValue=i; <option value="#tempValue">
#Model.droplist.ElementAt(i)</option>
}
</select>
}
</div>
<div class="col-lg-8" id="dateRange">
<div class="row">
<div class="col-lg-3">
<div class="input-group date" id="divFrom">
<div class="form-line">
<input id="startDate" name="startDate" type="text" class="form-control"
style="background-color: inherit; width: 85px" placeholder="dd/mm/yyyy"
value="#Model.StartDate">
</div>
<span class="input-group-addon">
<i class="fa fa-orange fa-calendar"></i>
</span>
</div>
</div>
<div class="col-lg-3">
<span class="font-13 text-muted div-center">to</span>
</div>
<div class="col-lg-3">
<div class="input-group date" id="divTo">
<div class="form-line">
<input id="endDate" name="endDate" type="text" class="form-control"
style="background-color: inherit; width: 85px" placeholder="dd/mm/yyyy"
value="#Model.EndDate">
</div>
<span class="input-group-addon">
<i class="fa fa-orange fa-calendar"></i>
</span>
</div>
</div>
<div class="col-lg-3">
<button id="btnTest" class="btn-orange fa-orange btn-sm" onclick="updateDateRanges()"
style="margin-left: 10px">Submit</button>
</div>
</div>
</div>
</div>

Related

the icon calendar is incorrectly positioned on the field

For my field validity, I would like to create a calendar field:
my code is the following:
<div class="col-12 col-12 col-md-4 col-lg-2">
<div class="form-group">
<label for="validity">Validaty</label>
<input id="validity" name="validity" type="text" class="form-control"
[(ngModel)]="order.validity"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Validity" autofocus>
</div>
</div>
I want to base myself on these two fields:
I have this code:
<div class="form-group row">
<label for="picker2" class="col-12 col-sm-4 col-form-label">{{'startDate | t }}</label>
<div class="col-12 col-sm-8">
<div class="input-group" style="background-color: white; max-width: 300px;">
<input id="picker2" class="form-control" placeholder="yyyy-mm-dd" name="dp2"
ngbDatepicker #dp2="ngbDatepicker" [(ngModel)]="search.enddate">
<div class="input-group-append" (click)="dp2.toggle()">
<div class="input-group-text">
<i class="icon-regular i-Calendar-4"></i>
</div>
</div>
</div>
</div>
</div>
I tried to adapt the code except that, the icon is incorrectly positioned on the field.
I don't understand where is the problem?
<div class="col-12 col-12 col-md-4 col-lg-2">
<div class="form-group">
<label for="validity">{{'3735' | t}}</label>
<input id="validity" name="validity" class="form-control" placeholder="yyyy-mm-dd" name="dp2"
ngbDatepicker #dp2="ngbDatepicker"
[(ngModel)]="order.validity "
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Validity" autofocus>
<div class="input-group-append" (click)="dp2.toggle()">
<div class="input-group-text">
<i class="icon-regular i-Calendar-4"></i>
</div>
</div>
</div>
Remove max-width: 300px;width: 100%; css from the input and move input and label inside <div class="input-group">
Check if this resolves your issue.
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" media="screen">
</head>
<body>
<div class="col-12 col-md-4 col-lg-2">
<div class="form-group">
<label for="validity">Stop</label>
<input id="validity" name="validity" type="text" class="form-control" style="background-color: white;" placeholder="STOP" autofocus>
</div>
</div>
</div>
<div class="col-12 col-12 col-md-4 col-lg-2">
<div class="form-group">
<label for="validity">{{'3735' | t}}</label>
<div class="input-group">
<input id="validity" name="validity" class="form-control" placeholder="yyyy-mm-dd" name="dp2"
ngbDatepicker #dp2="ngbDatepicker"
[(ngModel)]="order.validity "
style="background-color: white;"
placeholder="Validity" autofocus>
<div class="input-group-append" (click)="dp2.toggle()">
<div class="input-group-text">
<i class="icon-regular i-Calendar-4"></i>
</div>
</div>
</div>
</div>
</body>

Alignment for start date and end date

I have been trying since the morning to correctly align the start date and the end date but without success.
The start and end date do not line up like other blocks.
I do not understand anything...
If you solve my problem, I will be infinitely grateful to you. I really don't understand why the date blocks are not aligned.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<h1 id="welcome">HTML CSS JS</h1>
<div class="row">
<div class="col-12" *ngIf="currentView == 0">
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-12 col-lg-4">
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label">Libellé</label>
<div class="col-12 col-sm-9">
<input id="name" type="text" class="form-control" [(ngModel)]="search.name"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Libellé" autofocus>
</div>
</div>
<div class="form-group row">
<label for="ticker" class="col-12 col-sm-3 col-form-label">Bourse</label>
<div class="col-12 col-sm-9">
<input id="ticker" type="text" class="form-control" [(ngModel)]="search.ticker"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Bourse" autofocus>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="form-group row">
<label for="isin" class="col-12 col-sm-3 col-form-label">ISIN</label>
<div class="col-12 col-sm-9">
<input id="isin" type="text" class="form-control" [(ngModel)]="search.isin"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="ISIN" autofocus>
</div>
</div>
<div class="form-group row">
<label for="filterForMarkets" class="col-12 col-sm-3 col-form-label">Marché</label>
<div class="col-12 col-sm-9">
<select id="filterForMarkets" class="form-control"
style="width:100%; max-width: 300px;"
(change)="filterForMarkets($event.target.value)">
<option value="">--Tous les marchés--</option>
<option *ngFor="let m of markets" value={{m.marketID}}>
{{m.name}}
</option>
</select>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="form-group" >
<label for="date">Date de départ</label>
<div class="input-group">
<input name="beginDate" id="beginDate" type="text" class="form-control"
style="background-color: white; "
(ngModelChange)="changedBeginDateInput($event)" [(ngModel)]="beginDate">
<input id="picker1" class="form-control" placeholder="dd/mm/yyyy" name="dp1"
ngbDatepicker #dp1="ngbDatepicker" [(ngModel)]="begin.validityDate"
(ngModelChange)="changedBeginDate($event)"
style="position: absolute; left: 0; visibility: hidden">
<div class="input-group-append" (click)="dp1.toggle()">
<span class="input-group-text" id="basic-addon2">
<i class="icon-regular i-Calendar-4"></i>
</span>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="form-group" >
<label for="date">Date de fin</label>
<div class="input-group">
<input name="endDate" id="endDate" type="text" class="form-control"
style="background-color: white;"
(ngModelChange)="changedEndDateInput($event)" [(ngModel)]="endDate">
<input id="picker1" class="form-control" placeholder="dd/mm/yyyy" name="dp2"
ngbDatepicker #dp2="ngbDatepicker" [(ngModel)]="end.validityDate"
(ngModelChange)="changedEndDate($event)"
style="position: absolute; left: 0; visibility: hidden">
<div class="input-group-append" (click)="dp2.toggle()">
<span class="input-group-text" id="basic-addon2">
<i class="icon-regular i-Calendar-4"></i>
</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 ">
<div class="text-right">
<button type="button" class="btn btn-primary" (click)="launchSearch(modalConfirm)">
Rechercher
</button>
<button type="button" class=" ml-1 btn btn-primary" (click)="getTransactions(0)">
Affichez tous les mouvements
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Using flex property of CSS will solve your problem, it's very beneficial in aligning things as we want.
Try this:
.form-group {
display: flex;
}
And then you could obviously add margin and other properties for aligning all your items together.

modal not rendering to the center of the screen

I have implemented a modal window component using angular and having issues with rendering the component to the center of the screen. It renders at different positions on different screens. I tried many solutions googling but none of them seem to have worked so far.
If you see below as per the logic when my component loads it would apply style
modal-dialog modal-lg modal-dialog-centered if the size specified is 3
Component. When i inspect the element, I can see the styles being applied
import { Component, Input, OnChanges, OnInit, SimpleChange, SimpleChanges, DoCheck } from '#angular/core';
declare var $: any;
#Component({
selector: 'shared-modal',
templateUrl: './shared-modal.html'
})
export class SharedModal {
_isopen = false;
private _modalSize = 1; // 1:normal, 2: medium, 3: large
public get modalSize() {
return this._modalSize;
}
#Input()
public set modalSize(value) {
this._modalSize = value;
}
get open(): boolean {
return this._isopen;
}
#Input()
set open(val: boolean) {
this._isopen = val;
}
getModalDialogClass() {
if (this.modalSize == null || this.modalSize <= 1 || this.modalSize > 3) {
return 'modal-dialog';
} else if (this.modalSize <= 2) {
return 'modal-dialog modal-md';
} else if (this.modalSize <= 3) {
return 'modal-dialog modal-lg modal-dialog-centered ';
}
}
}
modal.scss
.modal-dialog {
max-width: 70%;
margin:5% auto;
}
.modal-content {
border-radius: 0;
}
screenshot
html markup that loads in the modal component with styles
<style>
.desc-header {
background-color: #FAE7D6;
color: black
}
.header {
width: 8%;
}
.panel-heading {
color: white;
background-color: #F59850;
border-color: #ddd;
}
.scrollClass {
height: 800px;
overflow-y: scroll;
overflow-x: hidden;
}
</style>
<div class="card">
<div class="card-header panel-heading">
<span style="font-size: 18px; font-weight: bold; ">Firm Details</span>
<div class="pull-right" style="padding-right:10px;">
<label class="btn btn-primary" [ngClass]="{'btn-primary': EditMode, 'btn-default': !EditMode }"><input
type="checkbox" [(ngModel)]="EditMode" class="hidden">Edit Mode</label>
</div>
</div>
<div class="card-body">
<form [formGroup]="frmFirm" (ngSubmit)="saveManager()">
<div *ngIf="FirmDetails && FirmDetails.Firm" class="card-body scrollClass" style="width:100%">
<div class="form-group row">
<label for="inputName" class="col-md-1 col-form-label modal-label header">Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="firmName" />
</div>
</div>
<div class="form-group row">
<label for="inputTitle" class="col-md-1 col-form-label header">Short Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.SHORT_NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="shortName" />
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Alternate Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.ALTERNATE_NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="alternateName" />
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Date Founded</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{dateFoundedDate}}</div>
<kendo-datepicker *ngIf="EditMode" [format]="'MMMM yyyy'" (valueChange)="dateFoundedChanged($event)" formControlName="dateFounded">
</kendo-datepicker>
</div>
</div>
<!-- <div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Intralinks Connections</label>
<div class="col-md-9">
<div class="form-group row">
<div class="col-md-3">
<label for="inputEmail">User Name</label>
</div>
<div class="col-md-3">
<label for="inputEmail">Password</label>
</div>
</div>
<div formArrayName="intraLinks"
*ngFor="let item of frmFirm.get('intraLinks').controls; let i = index; let last = last">
<div [formGroupName]="i">
<div class="form-group row">
<div class="col-md-3">
<input style="width:100%" formControlName="intraUsername"
placeholder="User Name">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="intraPassword"
placeholder="Password">
</div>
<div *ngIf="EditMode" class="col-md-3">
<button class="fa fa-trash" (click)="removeCredentials()"></button>
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addCredentials()">Add Credentials</button>
</div>
</div>
</div> -->
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Key Contact</label>
<div class="col-md-3">
<div *ngIf="!EditMode && FirmDetails.People">{{FirmDetails.KeyContact.Name}}</div>
<kendo-dropdownlist *ngIf="EditMode" style="width:100%" [data]="FirmDetails.People"
formControlName="People" [defaultItem]="FirmDetails.KeyContact.Name" [valuePrimitive]="true" (valueChange)="keyContactChange($event)"
[filterable]="true" (filterChange)="handleFilter($event)" textField="Name" valueField="ID">
</kendo-dropdownlist>
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Websites</label>
<div class="col-md-9">
<div class="form-group row">
<div class="col-md-3">
<label for="inputEmail">Website URL</label>
</div>
<div class="col-md-3">
<label for="inputEmail">User Name</label>
</div>
<div class="col-md-3">
<label for="inputEmail">Password</label>
</div>
</div>
<div formArrayName="websites"
*ngFor="let item of frmFirm.get('websites').controls; let i = index; let last = last">
<div [formGroupName]="i">
<div class="form-group row">
<div class="col-md-3">
<input style="width:100%" formControlName="websiteUrl"
placeholder="Website Url">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="username" placeholder="User Name">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="password" placeholder="Password">
</div>
<div *ngIf="EditMode" class="col-md-3">
<button (click)="removeWebsite()">Remove Website</button>
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addWebsite()">Add Website</button>
</div>
</div>
</div>
<div class="form-group row">
<!-- <label for="inputEmail" class="col-md-1 col-form-label header">Addresses</label> -->
<div class="col-md-12">
<!-- <div *ngIf="!EditMode">{{FirmDetails.Firm.Addresses}}</div> -->
<!-- <input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control" /> -->
<div formArrayName="addressess"
*ngFor="let item of frmFirm.get('addressess').controls; let i = index;">
<div [formGroupName]="i">
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'streetId' + i}}">Street
1</label>
<div class="col-md-9">
<input class="form-control" id="{{'streetId' + i}}" type="text"
placeholder="Street address (required)" formControlName="street">
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'line2Id' + i}}">Line
2</label>
<div class="col-md-9">
<input class="form-control" id="{{'line2Id' + i}}" type="text"
placeholder="Street address (second line)" formControlName="line2">
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'line3Id' + i}}">Line
3</label>
<div class="col-md-9">
<input class="form-control" id="{{'line3Id' + i}}" type="text"
placeholder="Street address (third line)" formControlName="line3">
</div>
</div>
<!-- <div class="form-group row ">
<label class="col-md-1 col-form-label header" attr.for="{{'cityId' + i}}">City, Zip
Code</label>
<div class="col-md-3">
<kendo-dropdownlist style="width:100%" [data]="cities" [valuePrimitive]="true"
formControlName="city" [filterable]="false" textField="Name"
valueField="Id"></kendo-dropdownlist>
</div>
<div class="col-md-2">
<input class="form-control" id="{{'zipCodeId' + i}}" type="number"
placeholder="Zip Code" formControlName="zipCode">
</div>
</div> -->
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'phoneId' + i}}">Line
3</label>
<div class="col-md-9">
<input class="form-control" id="{{'phoneId' + i}}" type="text"
placeholder="Phone" formControlName="phone">
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addAddress()">Add Address</button>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12" style="padding-top:10px;padding-left: 0px;padding-right: 30px;">
<div class="desc-header">Firm History</div>
<div class="divEditor">
<ckeditor [editor]="Editor" [id]="'ckFirmHistory'" *ngIf="EditMode"
formControlName="firmHistory" style="font-size: 11px;" debounce="500"
[config]="EditorConfig">
</ckeditor>
<div style="padding: 10px" *ngIf="!EditMode" [innerHTML]="FirmDetails.Firm.HISTORY_HTML">
</div>
</div>
</div>
</div>
</div>
<div class="btn-toolbar" style="padding-top:40px;">
<span> <button class="btn btn-default btn mr-3">
<i class="fa fa-file-pdf-o"></i>
Download Template
</button>
</span>
<span> <button class="btn btn-default btn mr-3">
<i class="fa fa-th-large"></i>
Upload Template Data
</button>
</span>
<span *ngIf="EditMode"><button type="submit" class="btn btn-primary btn-view-all btn mr-3">Save</button>
</span>
<span><button type="button" class="btn btn-primary btn-view-all btn mr-3"
(click)="cancelManager">Cancel</button>
</span>
<span><button type="button" style="float: right;" class="btn btn-primary btn-view-all"
(click)="deleteManager()">Delete</button>
</span>
</div>
</form>
</div>
</div>
I believe this issue can be solved with flexbox. Check out some of the documentation and see if any of it can help you (be sure to set the container to display: flex as the answer above me said)
https://css-tricks.com/snippets/css/a-guide-to-flexbox/

labels and controls not correctly aligned

I am designing an HTML template using bootstrap 4.3 and having issues with my column alignments. I am new to boostrap hence finding it difficult to align. If you notice some of the text in the columns wrap and the columns following the controls are not currently aligned since the width of the first column varies. I need to keep the width of the first column consistent so that the controls following that are aligned correctly from top to bottom. I have applied col-md-1 for the labels. Increasing it to col-md2 makes it even longer. Could some body help me with that
See the screenshot below
Html
<style>
.desc-header {
background-color: #FAE7D6;
color: black
}
.header {
width: 8%;
}
.panel-heading {
color: white;
background-color: #F59850;
border-color: #ddd;
}
.scrollClass {
height: 800px;
overflow-y: scroll;
overflow-x: hidden;
}
</style>
<div class="card">
<div class="card-header panel-heading">
<span style="font-size: 18px; font-weight: bold; ">Firm Details</span>
<div class="pull-right" style="padding-right:10px;">
<label class="btn btn-primary" [ngClass]="{'btn-primary': EditMode, 'btn-default': !EditMode }"><input
type="checkbox" [(ngModel)]="EditMode" class="hidden">Edit Mode</label>
</div>
</div>
<div class="card-body">
<form [formGroup]="frmFirm" (ngSubmit)="onSubmit()">
<div *ngIf="FirmDetails && FirmDetails.Firm" class="card-body scrollClass" style="width:100%">
<div class="form-group row">
<label for="inputName" class="col-md-1 col-form-label modal-label header">Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="firmName" />
</div>
</div>
<div class="form-group row">
<label for="inputTitle" class="col-md-1 col-form-label header">Short Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.SHORT_NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="shortName" />
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Alternate Name</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{FirmDetails.Firm.ALTERNATE_NAME}}</div>
<input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control"
formControlName="alternateName" />
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Date Founded</label>
<div class="col-md-3">
<div *ngIf="!EditMode">{{dateFoundedDate}}</div>
<kendo-datepicker *ngIf="EditMode" [format]="'MMMM yyyy'" formControlName="dateFounded">
</kendo-datepicker>
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Intralinks Connections</label>
<div class="col-md-9">
<div class="form-group row">
<div class="col-md-3">
<label for="inputEmail">User Name</label>
</div>
<div class="col-md-3">
<label for="inputEmail">Password</label>
</div>
</div>
<div formArrayName="intraLinks"
*ngFor="let item of frmFirm.get('intraLinks').controls; let i = index; let last = last">
<div [formGroupName]="i">
<div class="form-group row">
<div class="col-md-3">
<input style="width:100%" formControlName="intraUsername"
placeholder="User Name">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="intraPassword"
placeholder="Password">
</div>
<div *ngIf="EditMode" class="col-md-3">
<button class="fa fa-trash" (click)="removeCredentials()"></button>
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addCredentials()">Add Credentials</button>
</div>
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Key Contact</label>
<div class="col-md-3">
<div *ngIf="!EditMode && FirmDetails.People">{{FirmDetails.KeyContact.Name}}</div>
<kendo-dropdownlist *ngIf="EditMode" style="width:100%" [data]="FirmDetails.People"
formControlName="People" [defaultItem]="FirmDetails.KeyContact.Name" [valuePrimitive]="true"
[filterable]="false" textField="Name" valueField="ID"></kendo-dropdownlist>
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-md-1 col-form-label header">Websites</label>
<div class="col-md-9">
<div class="form-group row">
<div class="col-md-3">
<label for="inputEmail">Website URL</label>
</div>
<div class="col-md-3">
<label for="inputEmail">User Name</label>
</div>
<div class="col-md-3">
<label for="inputEmail">Password</label>
</div>
</div>
<div formArrayName="websites"
*ngFor="let item of frmFirm.get('websites').controls; let i = index; let last = last">
<div [formGroupName]="i">
<div class="form-group row">
<div class="col-md-3">
<input style="width:100%" formControlName="websiteUrl"
placeholder="Website Url">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="username" placeholder="User Name">
</div>
<div class="col-md-3">
<input style="width:100%" formControlName="password" placeholder="Password">
</div>
<div *ngIf="EditMode" class="col-md-3">
<button (click)="removeWebsite()">Remove Website</button>
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addWebsite()">Add Website</button>
</div>
</div>
</div>
<div class="form-group row">
<!-- <label for="inputEmail" class="col-md-1 col-form-label header">Addresses</label> -->
<div class="col-md-9">
<!-- <div *ngIf="!EditMode">{{FirmDetails.Firm.Addresses}}</div> -->
<!-- <input *ngIf="EditMode" kendoTextBox [readonly]="false" class="form-control" /> -->
<div formArrayName="addressess"
*ngFor="let item of frmFirm.get('addressess').controls; let i = index;">
<div [formGroupName]="i">
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'streetId' + i}}">Street
1</label>
<div class="col-md-9">
<input class="form-control" id="{{'streetId' + i}}" type="text"
placeholder="Street address (required)" formControlName="street">
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'line2Id' + i}}">Line
2</label>
<div class="col-md-9">
<input class="form-control" id="{{'line2Id' + i}}" type="text"
placeholder="Street address (second line)" formControlName="line2">
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'line3Id' + i}}">Line
3</label>
<div class="col-md-9">
<input class="form-control" id="{{'line3Id' + i}}" type="text"
placeholder="Street address (third line)" formControlName="line3">
</div>
</div>
<div class="form-group row ">
<label class="col-md-1 col-form-label header" attr.for="{{'cityId' + i}}">City, Zip
Code</label>
<!-- <div *ngIf="!EditMode && FirmDetails.People">{{FirmDetails.Addresses}}</div> -->
<div class="col-md-3">
<kendo-dropdownlist style="width:100%" [data]="cities" [defaultItem]=""
[valuePrimitive]="true" formControlName="city" [defaultItem]=""
[filterable]="true" textField="Name" valueField="Id"></kendo-dropdownlist>
</div>
<div class="col-md-2">
<input class="form-control" id="{{'zipCodeId' + i}}" type="number"
placeholder="Zip Code" formControlName="zipCode">
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label header" attr.for="{{'phoneId' + i}}">Line
3</label>
<div class="col-md-9">
<input class="form-control" id="{{'phoneId' + i}}" type="text"
placeholder="Phone" formControlName="phone">
</div>
</div>
</div>
</div>
<div *ngIf="EditMode">
<button (click)="addAddress()">Add Address</button>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12" style="padding-top:10px;padding-left: 0px;padding-right: 30px;">
<div class="desc-header">Firm History</div>
<div class="divEditor">
<ckeditor [editor]="Editor" [id]="'ckFirmHistory'" *ngIf="EditMode"
formControlName="firmHistory" style="font-size: 11px;" debounce="500"
[config]="EditorConfig">
</ckeditor>
<div style="padding: 10px" *ngIf="!EditMode" [innerHTML]="FirmDetails.Firm.HISTORY_HTML">
</div>
</div>
</div>
</div>
</div>
<div class="btn-toolbar" style="padding-top:40px;">
<span> <button class="btn btn-default btn mr-3">
<i class="fa fa-file-pdf-o"></i>
Download Template
</button>
</span>
<span> <button class="btn btn-default btn mr-3">
<i class="fa fa-th-large"></i>
Upload Template Data
</button>
</span>
<span *ngIf="EditMode"><button type="button" class="btn btn-primary btn-view-all btn mr-3"
(click)="saveManager()">Save</button>
</span>
<span><button type="button" class="btn btn-primary btn-view-all btn mr-3"
(click)="cancelManager">Cancel</button>
</span>
<span><button type="button" style="float: right;" class="btn btn-primary btn-view-all"
(click)="deleteManager()">Delete</button>
</span>
</div>
</form>
</div>
</div>

How to make a drop down button float along side of a list item using html & css?

please have a look at the attached image.
What I want to do is align the drop down button to be aligned (something like it will overlap on the items following the 1st list item) with the first item of the repeating list. I can do it by adding the drop down button in a column inside repeating list, but in that case the gap between 1st & 2nd items got very large. Any ideas will be greatly appreciated.
I am using HTML, CSS Bootstrap
Edit
The code is large thats why I choose not to provide it on the 1st go. However, here it is:
<div class="packaging-task-section">
<div class="row packaging-items-header" style="margin-left: 1px;">
<div class="col-md-2 small-padding-right-only">
<label class="control-label">Item</label>
</div>
<div class="col-md-1 small-padding-right-only">
<label class="control-label">Unit</label>
</div>
<div class="col-md-1 small-padding-right-only">
<label class="control-label">No Of Unit</label>
</div>
<div class="col-md-1 small-padding-right-only">
<label class="control-label">Unit Cost</label>
</div>
<div class="col-md-2 small-padding-right-only">
<label class="control-label">Unit Sell</label>
</div>
<div class="col-md-2 small-padding-right-only">
<label class="control-label">Total Sell</label>
</div>
<div class="col-md-1">
</div>
<div class="col-md-2 table-condensed table-packaging nopadding padding-right-5">
<div class="pull-right margin-top-10" style="width: 185px; margin-right: 8px;">
some control
</div>
</div>
</div>
<div ng-repeat="item in someList" class="handle-package-item row" style="margin-left: 2px;">
<div class="col-md-2 small-padding-right-only">
custom directive
<span class="glyphicon glyphicon-remove-sign form-control-feedback right-5-top-5" aria-hidden="true"></span>
</div>
<div class="col-md-1 small-padding-right-only">
<input class="form-control input-sm handle-package-task-item-unit-{{$index}}" data-ng-disabled="true" data-ng-model="packageTaskItem.unitName" />
</div>
<div class="col-md-1 small-padding-right-only">
<input type="text" class="form-control input-sm handle-package-task-item-no-{{$index}} padding-right-0"
data-ng-model="packageTaskItem.numberOfUnits"
ng-change="method()" only-digitals />
</div>
<div class="col-md-1 small-padding-right-only">
<input class="form-control handle-package-task-item-cost-{{$index}} input-sm" data-ng-disabled="true" data-ng-model="packageTaskItem.cost" money-value />
</div>
<div class="col-md-2 small-padding-right-only">
<div class="col-md-12 nopadding input-icon">
<i class="fa fa-dollar"></i>
<input money-value placeholder="0.00" data-ng-disabled="!packageTaskItem.packagingItemKey" name="packaging-item-sell-{{$index}}"
class="form-control handle-package-task-item-sell-{{$index}} padding-right-0 input-sm"
min="0" data-ng-model=" packageTaskItem.sell" />
</div>
</div>
<div class="col-md-2 small-padding-right-only">
<input required class="form-control input-sm" disabled data-ng-model="packageTaskItem.itemTotalSell" money-value />
</div>
<div class="col-md-1 small-padding-right-only">
<div class="checkbox-inline">
<a href="javascript:;" class="font-red handle-package-item-remove">
<i class="fa fa-times font-icon"></i>
</a>
</div>
</div>
<div class="col-md-2">
</div>
</div>
<div class="table-condensed table-packaging row nopadding padding-right-5">
<div class="col-md-7 small-padding-right-only" style="display: table-cell;">
<label class="control-label pull-right bold">Total Amount</label>
</div>
<div class="col-md-2 small-padding-right-only" style="display: table-cell;">
<div class="col-md-12" style="width: auto;">
<input class="form-control input-sm" value="" disabled data-ng-model="vm.packagingTotal" money-value />
</div>
</div>
<div class="col-md-1 small-padding-right-only" style="display: table-cell;">
<label class="pull-right bold">Actual Charge</label>
</div>
<div class="col-md-2 small-padding-right-only" style="display: table-cell;">
<div class="col-md-12 nopadding input-icon right">
some custom directive
</div>
</div>
</div>
</div>
<div class="clearfix">
</div>
Edit 2
Where the gap between 1st and 2nd row (or as in the 1st image, header & 1st row) will not be affected by the height of the drop down.