HTML+;CSS(弹性方向:列反转;不适用于我)

HTML+;CSS(弹性方向:列反转;不适用于我),css,Css,我试着把最上面的三个蓝色盒子放到右边的容器里。 在我可以垂直显示这3个蓝色方框的地方,我忽略了为什么它们只是从左到右浮动在我的文本上方,而不是我想要的。 目前陷入困境,花了2个小时试图找出我的错误 我使用,弯曲方向:柱反向;方法。 代码: 我修好了,但现在有了新问题, 我确实删除了,float:left,在CSS中的{.pc_cat_columnrelated} 但现在这三个框位于文本上方,而不是文本右侧 <style> #part1 {

我试着把最上面的三个蓝色盒子放到右边的容器里。 在我可以垂直显示这3个蓝色方框的地方,我忽略了为什么它们只是从左到右浮动在我的文本上方,而不是我想要的。 目前陷入困境,花了2个小时试图找出我的错误 我使用,弯曲方向:柱反向;方法。 代码:


我修好了,但现在有了新问题, 我确实删除了,float:left,在CSS中的{.pc_cat_columnrelated} 但现在这三个框位于文本上方,而不是文本右侧

 <style>


            #part1 {

        border-bottom: 4px solid #2b8bc6;
        background: linear-gradient(to bottom, #4eb5e5 0%, #389ed5 100%);

        top: -40px;
        left: 0px;
        position: relative;
        text-align:center;
        border-radius:5px;


            }
            /* part box */
            .part11 {
        width: 101px;
        height: 101px;
        text-align:center;
      }
      /* text inside part boxes */







          </style>

    <title>HowTo lose weight fast and safely</title>
  </head>
  <body>


        <div id="relatedcontainer">

          <div class="pc_main_mainrelated">


            <!-- MAIN (Center website) -->
            <div class="pc_cat_mainrelated">
          <div class="pc_catrelated">
          <div class="pc_cat_columnrelated">
            <div class="pc_cat_contentrelated">
              <button 
              onclick="window.location.href = 'HowTo_computers_cat_Networks_cat_.html';">
            <img src="/HowTo/img/related3.jpg" alt="networks_img" style="width:100%">
          </button>
              <h3>How to Run fast</h3>

            </div>
          </div>
          <div class="pc_cat_columnrelated">
            <div class="pc_cat_contentrelated">
              <button 
              onclick="window.location.href = 'HowTo_computers_cat_Networks_cat_.html';">
            <img src="/HowTo/img/related1.jpg" alt="networks_img" style="width:100%">
          </button>
              <h3>How to get abs</h3>

            </div>
          </div>
          <div class="pc_cat_columnrelated">
            <div class="pc_cat_contentrelated">
              <button 
              onclick="window.location.href = 'HowTo_computers_cat_Networks_cat_.html';">
            <img src="/HowTo/img/related2.jpg" alt="networks_img" style="width:100%">
          </button>
              <h3>How to get fat fast</h3>

            </div>
          </div>



        </div>
      </div>

      <!-- END MAIN -->
      </div>


    </div>

    <div class="box11">
        <div class="internallinks"><a href="HowTo_com.html">Main Categories</a> >> <a href="HowTo_health_cat.html">Health Sub Categories</a> >><a href="HowTo_health_cat_HowToLoseWeightFastAndSafety.html"> HowTo lose weight fast and safely</a>   </div>

      <div class="box22">

        <br></br>

        <hr class="hr1">
          <h1>How to Lose Weight fast and safely</h1>
          <hr class="hr1">






          <p>You want to drop pounds, now. And you want to do it safely. But how?</p>
          <p>First, keep in mind that many experts say it’s best to lose weight gradually. It’s more likely to stay off. If you shed pounds too fast, you’ll lose muscle, bone, and water instead of fat, says the Academy of Nutrition and Dietetics.</p>
          <p>The academy’s advice: Aim to lose 1-2 pounds per week, and avoid fad diets or products that make promises that sound too good to be true. It’s best to base your weight loss on changes you can stick with over time.</p>
          <p>For faster results, you’ll need to work with a doctor, to make sure that you stay healthy and get the nutrients that you need.


        <br /><br />

      <br /><br />

      </div>

  </div>


</body>

</html>
css:

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
hr.hr1 {
  border-top: 0.5px solid #d8e3f5;
}
ul {
  list-style-position: inside;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.9;
  background-color: #d8e3f5;
}
.internallinks {
  text-align: center;
  margin-top: 80px;
  color: #767676;
  background-color: #d8e3f5;
  cursor: default;
}

/* main page + navbar */
#mainboxes {
  background: #e9e9e9;
  display: flex;
  flex-wrap: wrap;
  /* align items horizental */
  justify-content: center;
  /* options for justify-content: 
      flex-start
      flex-end
      center
      space-between
      space-around
      space-evenly*/

  /* align items vertical must be height */
  height: 874px;
  align-items: baseline;
  /* otions:
         flex-start
        flex-end
        center
        baseline
        stretch */
  align-content: center;
  /*align items vertical where extra space  */

  /* options:
        flex-start 
        flex-end
        center
        space-between
        space-around
        stretch*/

  /* can also align single item using
        align-self: center; or other commands
         */
}

/* logo and navbar buttons */


/* related style */

#pc_main_mainrelated {
  box-sizing: border-box;
}
#pc_main_mainrelated .p {
  text-align: bottom;
}

#pc_main_mainrelated .body {
  background-color: #e9e9e9;
  padding: 10px;
  font-family: Arial;
}

/* Center website */
.pc_cat_mainrelated {
  max-width: 1000px;
  margin: auto;
}

#pc_main_mainrelated .h1 {
  font-size: 10px;
  word-break: break-all;
}

.pc_catrelated {
  margin: 8px -16px;
}

/* Add padding BETWEEN each column */
.pc_catrelated,
.pc_catrelated > .pc_cat_columnrelated {
  padding: 8px;
}

/* Create four equal columns that floats next to each other */
.pc_cat_columnrelated {
  float: left;
  width: 25%;
}

/* Clear floats after rows */
.pc_catrelated:after {
  content: "";
  display: table;
  clear: both;
}

/* Content */
/* categories border */
.pc_cat_contentrelated {
  border-bottom: 4px solid #2b8bc6;
  background: linear-gradient(to bottom, #4eb5e5 0%, #389ed5 100%);
  text-align: center;
  font-size: 22px;
  padding: 12px;
  border-radius: 10px;
  height: 250px;
  margin-top: 50px;
}
/* image in categories */
.pc_cat_contentrelated img {
  width: 180px;
  height: 100px;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: -2px;
}
/* categories text style */
.pc_cat_contentrelated h3 {
  color: white;
  font-family: "Open Sans", sans-serif;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  font-size: 20px;
  text-indent: 5px;
  box-shadow: 0px 1.5px 0px 0px rgba(0, 0, 0, 0.2);
}





#relatedcontainer {
  background-color: #d8e3f5;
  margin-top: 20px;
  flex-direction: column-reverse;
  display: flex;
  flex-wrap: wrap;


}
.related {
  background: #f4f4f4;
  border: #ccc solid 1px;
  padding: 1rem;
  text-align: center;
  margin: 0.5rem;
  flex-basis: 100px;
}