I am trying to create a header like this:

But I need help because I canโt get it right.
I planned to use a gradient, but should only have a heading text (with some addition) with a background color, and the gradient changes color at a specific point in the table cell. The title can be in different words - long and short - so the background color cannot be stopped at a specific point. I also need the width of the cell to be underlined (border-bottom).
I'm not sure if my HTML needs to be changed, or my CSS needs to be changed either in both cases, or if this can be done.
My HTML is:
<div class="wrapper"> <div class="row"> <div class="heading">Heading</div> </div> <div class="row"> <div class="stuff">Just some stuff.</div> </div> </div>
My CSS code is:
.wrapper { border-spacing: 0px 0px; display: table; width: 100%; } .row { display: table-row; } .heading { border-bottom: 2px solid red; background-color: lime; color: blue; direction: ltr; display: table-cell; font-weight: bold; min-height: 25px; overflow: hidden; padding: 2px; padding-left: 30px; padding-right: 30px; text-align: left; text-transform: uppercase; vertical-align: top; } .stuff { width: 100%; display: table-cell; }
source share