When adding a lot of text inside div- next element moves down












-1















I'm using a flexed div. Right now when I add a lot of text inside it somehow it makes the divs near to move and lose their position, hope you guys could help out.



picture 1:
enter image description here



picture 2:
enter image description here



As you see in pictures, where there is not much text everything works fine, but a little bit of lorem and everything goes bad - and the sizes inside the divs also changes even though I used flex-grow of 3 on each of them



html:



<section id='portfolio'>
<h1>My Projects</h1>
<div class="slider">
<div class="left">
<span class="left-arrow"></span> </div>
<ul>
<li class="slider-item">
<div class="app">
<img src="./images/movies.jpg" alt="">
<ul>
<li>Name: Movies WebApp</li>
<li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam.</li>
<li>Backend: -</li>
<li>Frontend: Angular, CSS, Html</li>
<li>DB: -</li>

</ul>
</li>
</ul>
<div class="right"><span class="right-arrow"></span></div>
<ol class="pagination">
</ol>
</div>
</div>

</section>


css:



.slider {
min-width: 100%;
flex-wrap: wrap;
display: flex;
justify-content: center;
}

.slider ul {
flex-grow: 10;
min-height: 300px;
justify-content: center;
}

.slider ul .slider-item {
min-height: 300px;
display: flex;
position: relative;
}

.app {
padding: 20px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: rgb(0, 0, 0);
overflow: hidden;
box-sizing: border-box;
}
.app img {
min-width: 500px;
height: 300px;
flex-grow: 3;
}
.app ul {
overflow: hidden;
display: flex;
flex-direction: column;
margin-left: 20px;
color: black;
width: 100%;
flex-grow: 3;
justify-content: center;
background-color: aqua;
}

.app ul li {
flex-grow: 1;
}

.right,
.left {
padding: 20px;
flex-grow: 1;
position: relative;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
transition: 0.3s;
position: relative;
min-width: 40px;
flex-wrap: nowrap;
}

.left-arrow {
position: absolute;
left: 30px;
width: 20px;
height: 20px;
border-left: 2px solid rgb(163, 163, 163);
border-bottom: 2px solid rgb(163, 163, 163);
transform: rotate(45deg);
cursor: pointer;
transition: 0.3s;
}

.right-arrow {
position: absolute;
right: 30px;
width: 20px;
height: 20px;
border-right: 2px solid rgb(163, 163, 163);
border-bottom: 2px solid rgb(163, 163, 163);
transform: rotate(-45deg);
cursor: pointer;
transition: 0.5s;
}









share|improve this question



























    -1















    I'm using a flexed div. Right now when I add a lot of text inside it somehow it makes the divs near to move and lose their position, hope you guys could help out.



    picture 1:
    enter image description here



    picture 2:
    enter image description here



    As you see in pictures, where there is not much text everything works fine, but a little bit of lorem and everything goes bad - and the sizes inside the divs also changes even though I used flex-grow of 3 on each of them



    html:



    <section id='portfolio'>
    <h1>My Projects</h1>
    <div class="slider">
    <div class="left">
    <span class="left-arrow"></span> </div>
    <ul>
    <li class="slider-item">
    <div class="app">
    <img src="./images/movies.jpg" alt="">
    <ul>
    <li>Name: Movies WebApp</li>
    <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam.</li>
    <li>Backend: -</li>
    <li>Frontend: Angular, CSS, Html</li>
    <li>DB: -</li>

    </ul>
    </li>
    </ul>
    <div class="right"><span class="right-arrow"></span></div>
    <ol class="pagination">
    </ol>
    </div>
    </div>

    </section>


    css:



    .slider {
    min-width: 100%;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    }

    .slider ul {
    flex-grow: 10;
    min-height: 300px;
    justify-content: center;
    }

    .slider ul .slider-item {
    min-height: 300px;
    display: flex;
    position: relative;
    }

    .app {
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0);
    overflow: hidden;
    box-sizing: border-box;
    }
    .app img {
    min-width: 500px;
    height: 300px;
    flex-grow: 3;
    }
    .app ul {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    color: black;
    width: 100%;
    flex-grow: 3;
    justify-content: center;
    background-color: aqua;
    }

    .app ul li {
    flex-grow: 1;
    }

    .right,
    .left {
    padding: 20px;
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: 0.3s;
    position: relative;
    min-width: 40px;
    flex-wrap: nowrap;
    }

    .left-arrow {
    position: absolute;
    left: 30px;
    width: 20px;
    height: 20px;
    border-left: 2px solid rgb(163, 163, 163);
    border-bottom: 2px solid rgb(163, 163, 163);
    transform: rotate(45deg);
    cursor: pointer;
    transition: 0.3s;
    }

    .right-arrow {
    position: absolute;
    right: 30px;
    width: 20px;
    height: 20px;
    border-right: 2px solid rgb(163, 163, 163);
    border-bottom: 2px solid rgb(163, 163, 163);
    transform: rotate(-45deg);
    cursor: pointer;
    transition: 0.5s;
    }









    share|improve this question

























      -1












      -1








      -1








      I'm using a flexed div. Right now when I add a lot of text inside it somehow it makes the divs near to move and lose their position, hope you guys could help out.



      picture 1:
      enter image description here



      picture 2:
      enter image description here



      As you see in pictures, where there is not much text everything works fine, but a little bit of lorem and everything goes bad - and the sizes inside the divs also changes even though I used flex-grow of 3 on each of them



      html:



      <section id='portfolio'>
      <h1>My Projects</h1>
      <div class="slider">
      <div class="left">
      <span class="left-arrow"></span> </div>
      <ul>
      <li class="slider-item">
      <div class="app">
      <img src="./images/movies.jpg" alt="">
      <ul>
      <li>Name: Movies WebApp</li>
      <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam.</li>
      <li>Backend: -</li>
      <li>Frontend: Angular, CSS, Html</li>
      <li>DB: -</li>

      </ul>
      </li>
      </ul>
      <div class="right"><span class="right-arrow"></span></div>
      <ol class="pagination">
      </ol>
      </div>
      </div>

      </section>


      css:



      .slider {
      min-width: 100%;
      flex-wrap: wrap;
      display: flex;
      justify-content: center;
      }

      .slider ul {
      flex-grow: 10;
      min-height: 300px;
      justify-content: center;
      }

      .slider ul .slider-item {
      min-height: 300px;
      display: flex;
      position: relative;
      }

      .app {
      padding: 20px;
      width: 100%;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      background-color: rgb(0, 0, 0);
      overflow: hidden;
      box-sizing: border-box;
      }
      .app img {
      min-width: 500px;
      height: 300px;
      flex-grow: 3;
      }
      .app ul {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      margin-left: 20px;
      color: black;
      width: 100%;
      flex-grow: 3;
      justify-content: center;
      background-color: aqua;
      }

      .app ul li {
      flex-grow: 1;
      }

      .right,
      .left {
      padding: 20px;
      flex-grow: 1;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      transition: 0.3s;
      position: relative;
      min-width: 40px;
      flex-wrap: nowrap;
      }

      .left-arrow {
      position: absolute;
      left: 30px;
      width: 20px;
      height: 20px;
      border-left: 2px solid rgb(163, 163, 163);
      border-bottom: 2px solid rgb(163, 163, 163);
      transform: rotate(45deg);
      cursor: pointer;
      transition: 0.3s;
      }

      .right-arrow {
      position: absolute;
      right: 30px;
      width: 20px;
      height: 20px;
      border-right: 2px solid rgb(163, 163, 163);
      border-bottom: 2px solid rgb(163, 163, 163);
      transform: rotate(-45deg);
      cursor: pointer;
      transition: 0.5s;
      }









      share|improve this question














      I'm using a flexed div. Right now when I add a lot of text inside it somehow it makes the divs near to move and lose their position, hope you guys could help out.



      picture 1:
      enter image description here



      picture 2:
      enter image description here



      As you see in pictures, where there is not much text everything works fine, but a little bit of lorem and everything goes bad - and the sizes inside the divs also changes even though I used flex-grow of 3 on each of them



      html:



      <section id='portfolio'>
      <h1>My Projects</h1>
      <div class="slider">
      <div class="left">
      <span class="left-arrow"></span> </div>
      <ul>
      <li class="slider-item">
      <div class="app">
      <img src="./images/movies.jpg" alt="">
      <ul>
      <li>Name: Movies WebApp</li>
      <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam.</li>
      <li>Backend: -</li>
      <li>Frontend: Angular, CSS, Html</li>
      <li>DB: -</li>

      </ul>
      </li>
      </ul>
      <div class="right"><span class="right-arrow"></span></div>
      <ol class="pagination">
      </ol>
      </div>
      </div>

      </section>


      css:



      .slider {
      min-width: 100%;
      flex-wrap: wrap;
      display: flex;
      justify-content: center;
      }

      .slider ul {
      flex-grow: 10;
      min-height: 300px;
      justify-content: center;
      }

      .slider ul .slider-item {
      min-height: 300px;
      display: flex;
      position: relative;
      }

      .app {
      padding: 20px;
      width: 100%;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      background-color: rgb(0, 0, 0);
      overflow: hidden;
      box-sizing: border-box;
      }
      .app img {
      min-width: 500px;
      height: 300px;
      flex-grow: 3;
      }
      .app ul {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      margin-left: 20px;
      color: black;
      width: 100%;
      flex-grow: 3;
      justify-content: center;
      background-color: aqua;
      }

      .app ul li {
      flex-grow: 1;
      }

      .right,
      .left {
      padding: 20px;
      flex-grow: 1;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      transition: 0.3s;
      position: relative;
      min-width: 40px;
      flex-wrap: nowrap;
      }

      .left-arrow {
      position: absolute;
      left: 30px;
      width: 20px;
      height: 20px;
      border-left: 2px solid rgb(163, 163, 163);
      border-bottom: 2px solid rgb(163, 163, 163);
      transform: rotate(45deg);
      cursor: pointer;
      transition: 0.3s;
      }

      .right-arrow {
      position: absolute;
      right: 30px;
      width: 20px;
      height: 20px;
      border-right: 2px solid rgb(163, 163, 163);
      border-bottom: 2px solid rgb(163, 163, 163);
      transform: rotate(-45deg);
      cursor: pointer;
      transition: 0.5s;
      }






      html css html5 css3






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 '18 at 8:43









      hindi1991hindi1991

      957




      957
























          2 Answers
          2






          active

          oldest

          votes


















          1

















          .slider {
          min-width: 100%;
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          }

          .slider > ul {
          padding-left: 0;
          width: calc(100% - 160px);
          }

          .slider ul {
          flex-grow: 10;
          min-height: 300px;
          justify-content: center;
          }

          .slider ul .slider-item {
          min-height: 300px;
          display: flex;
          position: relative;
          }

          .app {
          padding: 20px;
          width: 100%;
          display: flex;
          flex-direction: row;
          justify-content: center;
          align-items: center;
          background-color: rgb(0, 0, 0);
          overflow: hidden;
          box-sizing: border-box;
          }
          .app img {
          min-width: 500px;
          height: 300px;
          flex-grow: 3;
          }
          .app ul {
          overflow: hidden;
          display: flex;
          flex-direction: column;
          margin-left: 20px;
          color: black;
          width: 100%;
          flex-grow: 3;
          justify-content: center;
          background-color: aqua;
          }

          .app ul li {
          flex-grow: 1;
          }

          .right,
          .left {
          padding: 20px;
          flex-grow: 1;
          position: relative;
          display: flex;
          justify-content: center;
          align-items: center;
          text-align: center;
          transition: 0.3s;
          position: relative;
          min-width: 40px;
          flex-wrap: nowrap;
          }

          .left-arrow {
          position: absolute;
          left: 30px;
          width: 20px;
          height: 20px;
          border-left: 2px solid rgb(163, 163, 163);
          border-bottom: 2px solid rgb(163, 163, 163);
          transform: rotate(45deg);
          cursor: pointer;
          transition: 0.3s;
          }

          .right-arrow {
          position: absolute;
          right: 30px;
          width: 20px;
          height: 20px;
          border-right: 2px solid rgb(163, 163, 163);
          border-bottom: 2px solid rgb(163, 163, 163);
          transform: rotate(-45deg);
          cursor: pointer;
          transition: 0.5s;
          }

          <section id='portfolio'>
          <h1>My Projects</h1>
          <div class="slider">
          <div class="left">
          <span class="left-arrow"></span> </div>
          <ul>
          <li class="slider-item">
          <div class="app">
          <img src="./images/movies.jpg" alt="">
          <ul>
          <li>Name: Movies WebApp</li>
          <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
          <li>Backend: -</li>
          <li>Frontend: Angular, CSS, Html</li>
          <li>DB: -</li>

          </ul>
          </li>
          </ul>
          <div class="right"><span class="right-arrow"></span></div>
          <ol class="pagination">
          </ol>
          </div>
          </div>

          </section>








          share|improve this answer































            0














            Just remove the "flex-wrap: wrap;" from the slider class, that is being problem with your example. Just follow the below code -:



            .slider {
            min-width: 100%;
            display: flex;
            justify-content: center;
            }





            share|improve this answer
























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334242%2fwhen-adding-a-lot-of-text-inside-div-next-element-moves-down%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1

















              .slider {
              min-width: 100%;
              display: flex;
              flex-wrap: wrap;
              justify-content: center;
              }

              .slider > ul {
              padding-left: 0;
              width: calc(100% - 160px);
              }

              .slider ul {
              flex-grow: 10;
              min-height: 300px;
              justify-content: center;
              }

              .slider ul .slider-item {
              min-height: 300px;
              display: flex;
              position: relative;
              }

              .app {
              padding: 20px;
              width: 100%;
              display: flex;
              flex-direction: row;
              justify-content: center;
              align-items: center;
              background-color: rgb(0, 0, 0);
              overflow: hidden;
              box-sizing: border-box;
              }
              .app img {
              min-width: 500px;
              height: 300px;
              flex-grow: 3;
              }
              .app ul {
              overflow: hidden;
              display: flex;
              flex-direction: column;
              margin-left: 20px;
              color: black;
              width: 100%;
              flex-grow: 3;
              justify-content: center;
              background-color: aqua;
              }

              .app ul li {
              flex-grow: 1;
              }

              .right,
              .left {
              padding: 20px;
              flex-grow: 1;
              position: relative;
              display: flex;
              justify-content: center;
              align-items: center;
              text-align: center;
              transition: 0.3s;
              position: relative;
              min-width: 40px;
              flex-wrap: nowrap;
              }

              .left-arrow {
              position: absolute;
              left: 30px;
              width: 20px;
              height: 20px;
              border-left: 2px solid rgb(163, 163, 163);
              border-bottom: 2px solid rgb(163, 163, 163);
              transform: rotate(45deg);
              cursor: pointer;
              transition: 0.3s;
              }

              .right-arrow {
              position: absolute;
              right: 30px;
              width: 20px;
              height: 20px;
              border-right: 2px solid rgb(163, 163, 163);
              border-bottom: 2px solid rgb(163, 163, 163);
              transform: rotate(-45deg);
              cursor: pointer;
              transition: 0.5s;
              }

              <section id='portfolio'>
              <h1>My Projects</h1>
              <div class="slider">
              <div class="left">
              <span class="left-arrow"></span> </div>
              <ul>
              <li class="slider-item">
              <div class="app">
              <img src="./images/movies.jpg" alt="">
              <ul>
              <li>Name: Movies WebApp</li>
              <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
              <li>Backend: -</li>
              <li>Frontend: Angular, CSS, Html</li>
              <li>DB: -</li>

              </ul>
              </li>
              </ul>
              <div class="right"><span class="right-arrow"></span></div>
              <ol class="pagination">
              </ol>
              </div>
              </div>

              </section>








              share|improve this answer




























                1

















                .slider {
                min-width: 100%;
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                }

                .slider > ul {
                padding-left: 0;
                width: calc(100% - 160px);
                }

                .slider ul {
                flex-grow: 10;
                min-height: 300px;
                justify-content: center;
                }

                .slider ul .slider-item {
                min-height: 300px;
                display: flex;
                position: relative;
                }

                .app {
                padding: 20px;
                width: 100%;
                display: flex;
                flex-direction: row;
                justify-content: center;
                align-items: center;
                background-color: rgb(0, 0, 0);
                overflow: hidden;
                box-sizing: border-box;
                }
                .app img {
                min-width: 500px;
                height: 300px;
                flex-grow: 3;
                }
                .app ul {
                overflow: hidden;
                display: flex;
                flex-direction: column;
                margin-left: 20px;
                color: black;
                width: 100%;
                flex-grow: 3;
                justify-content: center;
                background-color: aqua;
                }

                .app ul li {
                flex-grow: 1;
                }

                .right,
                .left {
                padding: 20px;
                flex-grow: 1;
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
                text-align: center;
                transition: 0.3s;
                position: relative;
                min-width: 40px;
                flex-wrap: nowrap;
                }

                .left-arrow {
                position: absolute;
                left: 30px;
                width: 20px;
                height: 20px;
                border-left: 2px solid rgb(163, 163, 163);
                border-bottom: 2px solid rgb(163, 163, 163);
                transform: rotate(45deg);
                cursor: pointer;
                transition: 0.3s;
                }

                .right-arrow {
                position: absolute;
                right: 30px;
                width: 20px;
                height: 20px;
                border-right: 2px solid rgb(163, 163, 163);
                border-bottom: 2px solid rgb(163, 163, 163);
                transform: rotate(-45deg);
                cursor: pointer;
                transition: 0.5s;
                }

                <section id='portfolio'>
                <h1>My Projects</h1>
                <div class="slider">
                <div class="left">
                <span class="left-arrow"></span> </div>
                <ul>
                <li class="slider-item">
                <div class="app">
                <img src="./images/movies.jpg" alt="">
                <ul>
                <li>Name: Movies WebApp</li>
                <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
                <li>Backend: -</li>
                <li>Frontend: Angular, CSS, Html</li>
                <li>DB: -</li>

                </ul>
                </li>
                </ul>
                <div class="right"><span class="right-arrow"></span></div>
                <ol class="pagination">
                </ol>
                </div>
                </div>

                </section>








                share|improve this answer


























                  1












                  1








                  1










                  .slider {
                  min-width: 100%;
                  display: flex;
                  flex-wrap: wrap;
                  justify-content: center;
                  }

                  .slider > ul {
                  padding-left: 0;
                  width: calc(100% - 160px);
                  }

                  .slider ul {
                  flex-grow: 10;
                  min-height: 300px;
                  justify-content: center;
                  }

                  .slider ul .slider-item {
                  min-height: 300px;
                  display: flex;
                  position: relative;
                  }

                  .app {
                  padding: 20px;
                  width: 100%;
                  display: flex;
                  flex-direction: row;
                  justify-content: center;
                  align-items: center;
                  background-color: rgb(0, 0, 0);
                  overflow: hidden;
                  box-sizing: border-box;
                  }
                  .app img {
                  min-width: 500px;
                  height: 300px;
                  flex-grow: 3;
                  }
                  .app ul {
                  overflow: hidden;
                  display: flex;
                  flex-direction: column;
                  margin-left: 20px;
                  color: black;
                  width: 100%;
                  flex-grow: 3;
                  justify-content: center;
                  background-color: aqua;
                  }

                  .app ul li {
                  flex-grow: 1;
                  }

                  .right,
                  .left {
                  padding: 20px;
                  flex-grow: 1;
                  position: relative;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  text-align: center;
                  transition: 0.3s;
                  position: relative;
                  min-width: 40px;
                  flex-wrap: nowrap;
                  }

                  .left-arrow {
                  position: absolute;
                  left: 30px;
                  width: 20px;
                  height: 20px;
                  border-left: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(45deg);
                  cursor: pointer;
                  transition: 0.3s;
                  }

                  .right-arrow {
                  position: absolute;
                  right: 30px;
                  width: 20px;
                  height: 20px;
                  border-right: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(-45deg);
                  cursor: pointer;
                  transition: 0.5s;
                  }

                  <section id='portfolio'>
                  <h1>My Projects</h1>
                  <div class="slider">
                  <div class="left">
                  <span class="left-arrow"></span> </div>
                  <ul>
                  <li class="slider-item">
                  <div class="app">
                  <img src="./images/movies.jpg" alt="">
                  <ul>
                  <li>Name: Movies WebApp</li>
                  <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
                  <li>Backend: -</li>
                  <li>Frontend: Angular, CSS, Html</li>
                  <li>DB: -</li>

                  </ul>
                  </li>
                  </ul>
                  <div class="right"><span class="right-arrow"></span></div>
                  <ol class="pagination">
                  </ol>
                  </div>
                  </div>

                  </section>








                  share|improve this answer
















                  .slider {
                  min-width: 100%;
                  display: flex;
                  flex-wrap: wrap;
                  justify-content: center;
                  }

                  .slider > ul {
                  padding-left: 0;
                  width: calc(100% - 160px);
                  }

                  .slider ul {
                  flex-grow: 10;
                  min-height: 300px;
                  justify-content: center;
                  }

                  .slider ul .slider-item {
                  min-height: 300px;
                  display: flex;
                  position: relative;
                  }

                  .app {
                  padding: 20px;
                  width: 100%;
                  display: flex;
                  flex-direction: row;
                  justify-content: center;
                  align-items: center;
                  background-color: rgb(0, 0, 0);
                  overflow: hidden;
                  box-sizing: border-box;
                  }
                  .app img {
                  min-width: 500px;
                  height: 300px;
                  flex-grow: 3;
                  }
                  .app ul {
                  overflow: hidden;
                  display: flex;
                  flex-direction: column;
                  margin-left: 20px;
                  color: black;
                  width: 100%;
                  flex-grow: 3;
                  justify-content: center;
                  background-color: aqua;
                  }

                  .app ul li {
                  flex-grow: 1;
                  }

                  .right,
                  .left {
                  padding: 20px;
                  flex-grow: 1;
                  position: relative;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  text-align: center;
                  transition: 0.3s;
                  position: relative;
                  min-width: 40px;
                  flex-wrap: nowrap;
                  }

                  .left-arrow {
                  position: absolute;
                  left: 30px;
                  width: 20px;
                  height: 20px;
                  border-left: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(45deg);
                  cursor: pointer;
                  transition: 0.3s;
                  }

                  .right-arrow {
                  position: absolute;
                  right: 30px;
                  width: 20px;
                  height: 20px;
                  border-right: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(-45deg);
                  cursor: pointer;
                  transition: 0.5s;
                  }

                  <section id='portfolio'>
                  <h1>My Projects</h1>
                  <div class="slider">
                  <div class="left">
                  <span class="left-arrow"></span> </div>
                  <ul>
                  <li class="slider-item">
                  <div class="app">
                  <img src="./images/movies.jpg" alt="">
                  <ul>
                  <li>Name: Movies WebApp</li>
                  <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
                  <li>Backend: -</li>
                  <li>Frontend: Angular, CSS, Html</li>
                  <li>DB: -</li>

                  </ul>
                  </li>
                  </ul>
                  <div class="right"><span class="right-arrow"></span></div>
                  <ol class="pagination">
                  </ol>
                  </div>
                  </div>

                  </section>








                  .slider {
                  min-width: 100%;
                  display: flex;
                  flex-wrap: wrap;
                  justify-content: center;
                  }

                  .slider > ul {
                  padding-left: 0;
                  width: calc(100% - 160px);
                  }

                  .slider ul {
                  flex-grow: 10;
                  min-height: 300px;
                  justify-content: center;
                  }

                  .slider ul .slider-item {
                  min-height: 300px;
                  display: flex;
                  position: relative;
                  }

                  .app {
                  padding: 20px;
                  width: 100%;
                  display: flex;
                  flex-direction: row;
                  justify-content: center;
                  align-items: center;
                  background-color: rgb(0, 0, 0);
                  overflow: hidden;
                  box-sizing: border-box;
                  }
                  .app img {
                  min-width: 500px;
                  height: 300px;
                  flex-grow: 3;
                  }
                  .app ul {
                  overflow: hidden;
                  display: flex;
                  flex-direction: column;
                  margin-left: 20px;
                  color: black;
                  width: 100%;
                  flex-grow: 3;
                  justify-content: center;
                  background-color: aqua;
                  }

                  .app ul li {
                  flex-grow: 1;
                  }

                  .right,
                  .left {
                  padding: 20px;
                  flex-grow: 1;
                  position: relative;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  text-align: center;
                  transition: 0.3s;
                  position: relative;
                  min-width: 40px;
                  flex-wrap: nowrap;
                  }

                  .left-arrow {
                  position: absolute;
                  left: 30px;
                  width: 20px;
                  height: 20px;
                  border-left: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(45deg);
                  cursor: pointer;
                  transition: 0.3s;
                  }

                  .right-arrow {
                  position: absolute;
                  right: 30px;
                  width: 20px;
                  height: 20px;
                  border-right: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(-45deg);
                  cursor: pointer;
                  transition: 0.5s;
                  }

                  <section id='portfolio'>
                  <h1>My Projects</h1>
                  <div class="slider">
                  <div class="left">
                  <span class="left-arrow"></span> </div>
                  <ul>
                  <li class="slider-item">
                  <div class="app">
                  <img src="./images/movies.jpg" alt="">
                  <ul>
                  <li>Name: Movies WebApp</li>
                  <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
                  <li>Backend: -</li>
                  <li>Frontend: Angular, CSS, Html</li>
                  <li>DB: -</li>

                  </ul>
                  </li>
                  </ul>
                  <div class="right"><span class="right-arrow"></span></div>
                  <ol class="pagination">
                  </ol>
                  </div>
                  </div>

                  </section>





                  .slider {
                  min-width: 100%;
                  display: flex;
                  flex-wrap: wrap;
                  justify-content: center;
                  }

                  .slider > ul {
                  padding-left: 0;
                  width: calc(100% - 160px);
                  }

                  .slider ul {
                  flex-grow: 10;
                  min-height: 300px;
                  justify-content: center;
                  }

                  .slider ul .slider-item {
                  min-height: 300px;
                  display: flex;
                  position: relative;
                  }

                  .app {
                  padding: 20px;
                  width: 100%;
                  display: flex;
                  flex-direction: row;
                  justify-content: center;
                  align-items: center;
                  background-color: rgb(0, 0, 0);
                  overflow: hidden;
                  box-sizing: border-box;
                  }
                  .app img {
                  min-width: 500px;
                  height: 300px;
                  flex-grow: 3;
                  }
                  .app ul {
                  overflow: hidden;
                  display: flex;
                  flex-direction: column;
                  margin-left: 20px;
                  color: black;
                  width: 100%;
                  flex-grow: 3;
                  justify-content: center;
                  background-color: aqua;
                  }

                  .app ul li {
                  flex-grow: 1;
                  }

                  .right,
                  .left {
                  padding: 20px;
                  flex-grow: 1;
                  position: relative;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  text-align: center;
                  transition: 0.3s;
                  position: relative;
                  min-width: 40px;
                  flex-wrap: nowrap;
                  }

                  .left-arrow {
                  position: absolute;
                  left: 30px;
                  width: 20px;
                  height: 20px;
                  border-left: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(45deg);
                  cursor: pointer;
                  transition: 0.3s;
                  }

                  .right-arrow {
                  position: absolute;
                  right: 30px;
                  width: 20px;
                  height: 20px;
                  border-right: 2px solid rgb(163, 163, 163);
                  border-bottom: 2px solid rgb(163, 163, 163);
                  transform: rotate(-45deg);
                  cursor: pointer;
                  transition: 0.5s;
                  }

                  <section id='portfolio'>
                  <h1>My Projects</h1>
                  <div class="slider">
                  <div class="left">
                  <span class="left-arrow"></span> </div>
                  <ul>
                  <li class="slider-item">
                  <div class="app">
                  <img src="./images/movies.jpg" alt="">
                  <ul>
                  <li>Name: Movies WebApp</li>
                  <li>Description: Manage movise stock Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae asperiores obcaecati quaerat fugit nisi dolore optio possimus facere ratione, maiores dicta earum aut tempora unde facilis vitae vero, quas totam. </li>
                  <li>Backend: -</li>
                  <li>Frontend: Angular, CSS, Html</li>
                  <li>DB: -</li>

                  </ul>
                  </li>
                  </ul>
                  <div class="right"><span class="right-arrow"></span></div>
                  <ol class="pagination">
                  </ol>
                  </div>
                  </div>

                  </section>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 16 '18 at 8:53









                  Joykal InfotechJoykal Infotech

                  1,003216




                  1,003216

























                      0














                      Just remove the "flex-wrap: wrap;" from the slider class, that is being problem with your example. Just follow the below code -:



                      .slider {
                      min-width: 100%;
                      display: flex;
                      justify-content: center;
                      }





                      share|improve this answer




























                        0














                        Just remove the "flex-wrap: wrap;" from the slider class, that is being problem with your example. Just follow the below code -:



                        .slider {
                        min-width: 100%;
                        display: flex;
                        justify-content: center;
                        }





                        share|improve this answer


























                          0












                          0








                          0







                          Just remove the "flex-wrap: wrap;" from the slider class, that is being problem with your example. Just follow the below code -:



                          .slider {
                          min-width: 100%;
                          display: flex;
                          justify-content: center;
                          }





                          share|improve this answer













                          Just remove the "flex-wrap: wrap;" from the slider class, that is being problem with your example. Just follow the below code -:



                          .slider {
                          min-width: 100%;
                          display: flex;
                          justify-content: center;
                          }






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 16 '18 at 11:10









                          amrut kaleamrut kale

                          111




                          111






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334242%2fwhen-adding-a-lot-of-text-inside-div-next-element-moves-down%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown