r/csshelp • u/rassawyer • Jun 02 '23
Request What am I doing wrong?
SOLVED!
Why does one element render correctly, and the other not? The first element is perfect, but the second, the weekChart, place the chart below the first element, but the buttons, and the date range at the far end.
HTML:
<section>
<div class="dayRow">
<button (click)="decrementDay()" mat-button>Prev</button>
<div>{{ dayStart | date }}</div>
<button (click)="incrementDay()" mat-button>Next</button>
</div>
<app-timeline [worklogs]="(daysWorklogs$ | async) || []"></app-timeline>
</section>
<section>
<div class="weekChart">
<button (click)="decrementWeek()" mat-button>Prev</button>
<div>{{ weekStart | date }} - {{ weekEnd | date }}</div>
<button (click)="decrementWeek()" mat-button>Next</button>
</div>
<app-timeline-week></app-timeline-week>
</section>
CSS:
.dayRow {
display: flex;
align-items: center;
> div {
margin: 0 15px;
}
}
.weekChart{
display: flex;
align-items: center;
> div {
margin: 0 15px;
}
}
Solution: I needed to wrap the charts themselves in <div> tags, and assign styling to them.
1
Upvotes
View all comments
Show parent comment
1
u/thirtyseven1337 Jun 03 '23
I don't really understand what it's supposed to look like... sounds like there's supposed to be two charts, but I only see one?