0

As the title of this thread already says, I'd like to get the following kind of grid:

enter image description here

The cells with the arrows should be connected and should contain text from a paragraph element and the pictures should be in these corners. The upper section should contain a different picture and text than the lower section.

Here's also an example of code where I would like to connect the cells of the paragraphs (divs) with each other so that the three divs contain a text which wraps around the picture as it does in the following picture of microsoft-word:

enter image description here

Code: (https://jsfiddle.net/kgeht5dq/6/)

.main-container {
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 50% 50%;
}

.row {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 100;
}

#img {
  width: 100%;
  height: 100%;
}
<div class='main-container'>
  <!-- this is the first mini container -->
  <div class='mini-container'>
    <!-- this is the first row text+image -->
    <div class='row first'>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
      <div>
        <img id='img' src='https://i.stack.imgur.com/od6Ln.jpg'>
      </div>
    </div>
    <!-- this is the second row text+text -->
    <div class='row second'>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
    </div>
  </div>
  <!-- this is the second mini container -->
  <div class='mini-container'>
    <!-- this is the third row image+text -->
    <div class='row third'>
      <div>
        <img id='img' src='https://i.stack.imgur.com/od6Ln.jpg'>
      </div>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
    </div>
    <!-- this is the forth row text+text -->
    <div class='row forth'>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
      <div>
        <p>
          t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
          content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
          versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
        </p>
      </div>
    </div>
  </div>

</div>
isherwood
  • 58,414
  • 16
  • 114
  • 157
  • Not possible with CSS-Grid. Grid cells are **rectangular**. This is easily achievable using `float`. – Paulie_D Aug 10 '21 at 18:00
  • ```float``` the image and get rid of the grid – Brandon Aug 10 '21 at 18:01
  • You can certainly still use the grid for general layout, though a flex column may be better. Just use conventional floats for the text wrap _inside_ the layout (the only remaining valid use for floats, IMO). – isherwood Aug 10 '21 at 18:07

0 Answers0