I'm having trouble making a coloured bar across a material 2 dialog box. With the following code I get bar which has padding/margin on each side. My aim is to get no margin around the bar.
<div style="min-height:200px" style = "position: relative; padding: 0; margin: 0;">
<div [style.color]="color" [style.background-color]="bgColor">
Title
</div>
Dialog Content Goes Here
</div>
It looks like this:

Thinking it is do with the padding. I made the following class. However the issue then is I am unable to make the width 100% of the dialog box due to the offset.
.card-dialog-bar {
position: relative;
margin-top: -25px;
margin-left:-25px;
margin-right:-25px;
width: 100%;
}

I highly appreciate if anyone can help get a bar across the top of the dialog box with no margins.