<main>
  <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">
  
  <div>
    My little creation.
  </div>
</main>
main {
  display: grid;
  grid-template-rows: auto;
  grid-template-columns: auto 1fr;
}

img, div {
  grid-area: 1 / 1 / span 1 / span 1;
}

div {
  display: flex;
  background-color: #0000FF55;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.