JSFiddle - React, Tailwind, and code Playground

by davidxmartins

HTML

<div class="hero">
  <div class="hero__content">
    <div class="hero__left">
      <h1 class="hero__header">Hero Header</h1>
    </div>
    <div class="hero__right">
      <div class="hero__icon" aria-labelledby="icon1">
        <svg role="img"><!-- SVG code here --></svg>
        <p id="icon1">Icon 1 name</p>
        <svg role="img"><!-- SVG code here --></svg>
        <p id="icon1">Icon 1 name</p>
        <svg role="img"><!-- SVG code here --></svg>
        <p id="icon1">Icon 1 name</p>
      </div>
      <!-- Repeat for the other two icons -->
    </div>
  </div>
</div>

CSS

body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background: green;
  color: white;
}

.hero-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.column-left {
  width: 40%;
  box-sizing: border-box;
  text-align: left;
  padding-left: 50px;
}

.column-right {
  width: 60%;
  box-sizing: border-box;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 60px;
  line-height: 1;
}

.icons-container {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align icons to the left */
  flex-wrap: wrap;
}

.icon {
  width: 100px; /* Adjust the width of the icons as needed */
  height: 100px; /* Adjust the height of the icons as needed */
  margin: 10px; /* Adjust the spacing between icons as needed */
}

@media screen and (max-width: 1200px) {
  .icons-container {
    flex-direction: column;
  }
}

@media screen and (max-width: 900px) {
  .hero-container {
    flex-direction: column;
  }

  .icons-container {
    margin-top: 20px; /* Adjust the margin between h1 and icons as needed */
    flex-direction: row; /* Change back to row layout for small screens */
  }

  .column-left,
  .column-right {
    width: 100%;
    text-align: left; /* Align text to the left */
  }
}