Problem in Challenge Project: Company Home Page with Flexbox

Hello all,

May I know why “Our Team” will move aside of the pics instead of the top of it like PIC 2?

PIC 1
螢幕擷取畫面 2023-04-16 083521
PIC 2

HTML

<!DOCTYPE html>
<html>
<head>
  <link href="https://fonts.googleapis.com/css?family=Damion" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,600,700" rel="stylesheet">
   <link rel="stylesheet"  href="styles.css" /> 
  <meta charset="UTF-8">
</head>
<body>
  <!-- Header -->
  <header>
    <div class="content">
      <h1>The VC Experience</h1>
      <nav class="desktop">
        <ul>
          <li><a href="#">Mission Statement</a></li>
          <li><a href="#">Portfolio</a></li>
          <li><a href="#">Investment Team </a></li>
        </ul>
      </nav>
      </div>
      <div class="intro content">
        <h2 >The VC Experience</h2>
        <h4>Our fund is committed to the furthering entrepreneurs in the mobility sector.</h4>
      </div>
  </header>
  <div class="port content">
<h2>Our Mobility Portfolio</h2>
<h4>Impacting diverse sectors of mobility to better the human experience and the world we inhabit</h4>
  </div>
  <div class="company">
    <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/hangar.jpg">
 
  <span>AREO</span>
  </div>
  <div class="company">
    <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/dashboard.jpg">
    <span>AUTO</span>
  </div>
  <div class="company">
    <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/blurred-lights.jpg">
    <span>LIGHT</span>
    </div>
     <div class="company">
    <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/tires.jpg">
    <span>TIERS</span>
    </div>
         <div class="company">
    <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/truck.jpg">
    <span>■■■■■ ■■■</span>
    </div>
    <div id="ta">
    <div class="team content">
    <h2>Our Team</h2>
      <div class="teammate">
 <img src="https://s.yimg.com/ny/api/res/1.2/7oDf.YcvCQ15uypFjv09ow--/YXBwaWQ9aGlnaGxhbmRlcjt3PTk2MDtoPTEzNTM7Y2Y9d2VicA--/https://media.zenfs.com/ko/ebc.net.tw/31afec9aa23bafab73cacbb0629f79e7">
      <h3>河北</h3>
      </div>
          <div class="teammate">
       <img src="https://s.yimg.com/ny/api/res/1.2/xjMPw250OxSDgd5f98BTOw--/YXBwaWQ9aGlnaGxhbmRlcjt3PTk2MDtoPTk2MDtjZj13ZWJw/https://media.zenfs.com/zh-Hant-HK/homerun/setn_com_683/d388d85405bed4b1daa12ef1f0059db0">
      <h3>櫻空</h3>
      </div>
        <div class="teammate">
       <img src="https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/employee-one.jpg">
      <h3>良心</h3>
      </div>
   </div>
   </div>
     
  </body>

CSS

    margin: 0;
    font-family: "Lexend Mega", sans-serif;
    color: black;
    background-color: white;
    font-size: 22px;
    text-align: center;
}

h1{
    display: block;
    font-size: 2em;
    
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
}

header li{
  display:inline-block;
  padding-left:40px;
  padding-right:40px;
  justify-content:space-around;
  text-decoration: underline;
  align-items: center;
    }

  .intro{
       height: 300px;
    background-image: url(https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/skyscrapers.jpg);
        background-repeat: no-repeat;
    background-size: cover;
     align-items: center;
         width:100%;
    margin:auto;
    padding-top:65px;
     }

  h2,h3,h4,p{
    margin:auto;
    padding:20px;
    background-color:white;
    align-items: center;
     }

h2 {
    display: block;
    font-size: 1.5em;
    text-align: center;
     font-weight: bold;
     align-items: center;
     margin-inline-start: 0px;
    margin-inline-end: 0px;
    }

h4 {
    display: block;
        margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
}
.port{
  padding-top:30px;
}

.company{
   display: inline-block;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
}

.company img{
  margin-left: auto;
    margin-right: auto;
    width: 200px;
    padding: 10px;
    height: auto;
}
.company span{
  padding:5px;
  width:240px;
  font-weight:bold;
  text-align:center;
}

img{
  overflow:clip;
  overflow-clip-margin: content-box;
}

.teammate img{
  margin-left: auto;
    margin-right: auto;
    max-width: 200px;
    padding: 10px;
    height: auto;
   }

.team{
     background-image: url(https://content.codecademy.com/PRO/independent-practice-projects/flexbox-business-site/img/blurred-road.jpg);
    padding-top: 70px;
    padding-top: 5px;
    display: flex;
    justify-content: center;
     background-size: cover;
    
}

.teammate{
   display: inline-block;
    flex-wrap: wrap;
        align-items: center;
}


1 Like

Hi, there!

I can see that you asked for assistance two days ago. Have you been able to resolve this problem yourself?

If not, the issue you are having has to do with your “.team” class. You currently have the display set to flex, which has an initial flex-direction of row. This is causing all of the elements within the div.team to fall next to each other (including the <h2>)

2 Likes

Got it ty ty sooooooo much!