Derek Derek - 3 months ago 11
CSS Question

HTML CSS Align two elements the same line

Panel

I need to create the above HTML.

It's a h3 with a blue background and to the right is an SVG for a tick.

I need to have both elements sitting on the same line, and the SVG embedded within the h3.

This looks so easy, but I can't figure out how to do this.

What is the best way to achieve the above?

Answer
<h3 style="background-color:blue;">About You 
    <img src="image.png" style="float:right;display:block;">
</h3>