I have inherited this project from someone else and I would not have set it up like this in the first place, but I have this component list-item-component:
<!-- These are for the glyph chevrons-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="row">
<div class="col-lg-6 item" *ngFor="let item of pageOfItems; let i = index">
<div class="well col-sm" (click)="showDetails(i)" [ngClass]="{'expanded': i === index}">
<div>
<span *ngIf="i !== index" id="spTitleGlyphRow#row#Col1" class="glyphicon glyphicon-chevron-right programTitleGlyph" aria-hidden="true"> </span>
<span *ngIf="i === index" id="spTitleGlyphRow#row#Col2" class="glyphicon glyphicon-chevron-down programTitleGlyph" aria-hidden="true"> </span>
<span id="spTitleRow#row#Col1" class="programTitle">{{item.programName}}</span>
</div>
<div *ngIf="i === index" id="dvProgramContentRow">
<div class="programInformation">
<p>{{item.description}}</p>
</div>
<div class="programContact">
<b>Contact:</b> {{item.fullName}}<br />
<b>Email:</b> {{item.email}}<br />
<b>Phone:</b> {{item.phone}}<br />
<b>Sector:</b> {{item.baseLocation}}
<br /><br />
<a href="{{item.website}}" target="_blank" class="btn btn-md btn-warning" role="button">Visit Site</a>
<button (click)="showMap(item.streetAddress)" class="btn btn-md btn-primary" role="button" [disabled]="item.streetAddress == 'na' || item.streetAddress == ''">Location</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<app-pagination
[items]="list"
(changePage)="onChangePage($event)"
[pageSize] = "selectedOption"
[renderPage] = "renderPage"
></app-pagination>
</div>
Here is the css for the page:
.well {
display: inline-block;
background-color: #f5f5f5;
padding: 30px;
border: 0;
border-radius: 0;
box-shadow: none;
margin-top: 5px;
cursor: pointer;
#dvProgramContentRow{
display: flex;
margin-left: 10px;
.programInformation{
flex: 2;
}
.programContact{
flex: 1;
}
}
}
.expanded {
background-color: #4B494C;
color: white;
}
.item {
padding: 5px;
}
.glyphicon{
margin-right: 5px;
}
And this is the list that uses these list-items:
<div class="container">
<div class="row well jhuBlue" >
<div class="col-sm-6 col-md-6 col-lg-8 color-blue">
<span class="CategoryHeader" *ngIf="list">{{list[0].categoryName}} - Program Names & Details</span>
</div>
<div class="col-sm-3 col-md-3 col-lg-2">
<span class="CategoryHeader">Show</span>
<select id="ddlDisplayNumber" [(ngModel)]="selectedOption" name="ddlDisplayNumber">
<option [ngValue]="listToShow.length">All</option>
<option [ngValue]=10>10</option>
<option [ngValue]=15>15</option>
<option [ngValue]=20>20</option>
</select>
<span class="CategoryHeader">Rows</span>
</div>
<div id="dvFilterClick" class="col-sm-3 col-md-3 col-lg-2 jhuBlue text-right">
<span class="spFilterBy CategoryHeader" (click)="openFilter()">Filter By<img src="../../../assets/images/white-down-arrow-png-2.png" height="27px" width="27px"></span>
</div>
</div>
<!-- <app-filter *ngIf="showFilter"-->
<!-- (selectedLocations)="filterByLocation($event)"-->
<!-- ></app-filter>-->
<div *ngIf="showFilter" id="dvFilterByRow" class="row">
<div class="col-lg-12">
<div id="dvFilterByContentRow" class="well dvFilterByContent">
<div id="dvFilterByProgramContentRow" style="margin-left: 10px">
<span style="font-size:1.2em"><b>LOCATIONS</b></span>
<br /><br />
<table class="clsLocationTable">
<tr>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnbv" name="cklnbv" [value]="1">
<label for="cklnbv">Bayview and surrounding areas</label>
</td>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnshe" name="cklnshe" value="4">
<label for="cklnshe">Harbor East</label>
</td>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnwmtw" name="cklnwmtw" value="7">
<label for="cklnwmtw">Mt. Washington</label>
</td>
</tr>
<tr>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnsnhdcw" name="cklnsnhdcw" value="2">
<label for="cklnsnhdcw">City-wide</label>
</td>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnsnhd" name="cklnsnhd" value="5">
<label for="cklnsnhd">Homewood and surrounding areas</label>
</td>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnsn" name="cklnsn" value="8">
<label for="cklnsn">Station North</label>
</td>
</tr>
<tr>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklneb" name="cklneb" value="3">
<label for="cklneb">East Baltimore</label>
</td>
<td>
<input type="checkbox" (change)="onCheckChange($event)" id="cklnmtvn" name="cklnmtvn" value="6">
<label for="cklnmtvn">Mt. Vernon</label>
</td>
<td>
</td>
</tr>
</table>
<input id="btnFilter" name="btnFilter" type="submit" value="Filter" (click)="onFilterSubmit()">
</div>
</div>
</div>
</div>
<app-list-item *ngIf="list"
[list] = "listToShow"
[selectedOption] = "selectedOption"
></app-list-item>
</div>
And the css:
.jhuBlue {
background-color: #005eb8;
}
.well {
padding: 30px;
}
.CategoryHeader {
color: white;
}
.spFilterBy {
cursor: pointer;
}
#dvFilterByRow {
margin-bottom: 5px;
padding: 30px;
overflow: hidden;
background-color: #D3D3D3;
}
If you need the .ts this is the only relevant code:
showDetails(index) {
if (index === this.index) {
this.index = -1;
}else{
this.index = index;
}
}
What I need to happen is for the expanded black area div dvProgramContentRow to take up the whole row. So instead of pushing the next row down to provide more room I'd like to just cover up the element to its left or if you click the left then expand to cover the item to the right. So basically expand horizontally rather than vertically. Like this:

How can I change the styling I have to make this happen?

