<div class="media" dir="ltr">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="蓝莓芝士蛋糕" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">蓝莓芝士蛋糕</h3>
    <p>食谱描述的地方。</p>
  </div>
</div>

<div class="media" dir="rtl">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="فطيرة الجبن بالتوت البري" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">فطيرة الجبن بالتوت البري</h3>
          <p>هنا سيكون شرح معين عن هذه الوصفة.</p>
  </div>
</div>
body {
   color: #fff;
   background-color: #101010;
   width: 100vw;
   min-height: 100vh;
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 6vh;
    margin: 0;
    box-sizing: border-box;
 }


.media {
  background: #2196F3;
  box-shadow: 0 3px 10px 0 rgba(33, 149, 243, 0.64);
  padding: 2vh;
  margin-bottom: 2.5rem;
  border-radius: 10px;
  min-width: 50vw;
  display: grid;
  position: relative;
  grid-template-columns: 10vw 1fr;
  gap: 2vw;
  
  h3 {
    font-size: 24px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  
  img {
    width: 10vw;
    height: 10vw;
    border-radius: 50%;
    border: 1px solid #a0161694;
    box-shadow: inset 2vh 2vh 2vh rgba(203, 32, 32, 0.75);
  }
  
  &::before {
    content: attr(dir);
    font-size: 2vw;
    padding: 2vh 4vh;
    background: rgba(201, 236, 24, 0.5);
    border-radius: 8px 0 0 8px;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translate(0, -50%);
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.