I would like to place the image next to header with the header centered over the paragraph and not centered between the image and the right side. using text-align:center
will align the header between the image and the right side. I would like it centered above the paragraph with the image to the left of it. If possible I would like to do without adjusting the padding or adding unneeded elements.
body {
max-width: 8.5in
}
h1 {
align: center;
dispaly: flex;
}
img {
float: left;
}
p {
clear: both;
}
<img src="//dummyimage.com/150">
<h1> header</h1>
<p>paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph</p>