looking for some solutions? You are welcome.

SOLVED: Display: Flex not producing content under it

Talha Munir:

Why is the paragraph in the second column being produced on the right of the heading rather than below it? I used display: flex to align the content in middle and center but I want the new elements within the column to be stacked under the previous element.

    background: linear-gradient(to right, #4b53ff, #9e63ff);
    width: 100vw;
    height: 100vh;
    background-size: cover;
main .row{
    width: 65vw;
    height: 60vh;
    display: flex;
    text-align: center;
    align-items: center;
    background-color: white;
    height: 100%;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    background: linear-gradient(to right, #7633e5, #178ee0);
    border-bottom-right-radius: 15px;
    border-top-right-radius: 15px;
    height: 100%;
    width:  100%;
<!doctype html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="main.css">
    <main class="d-flex align-items-center ">
        <div class="container d-flex justify-content-center">
            <div class="row ">
                <div class="col-lg-4  col-md-4 col-sm-4 col1  d-flex align-items-center justify-content-center">
                    <h2 class="block">login</h2>

                <div class="col-lg-8 col-md-8 col-sm-8 col2 d-flex align-items-center ">
                    <h2 class="d-block justify-content-center">Random heading</h2>
                    <p class="d-block justify-content-center">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
                        labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                        nisi ut aliquip ex ea commodo consequat. </p>

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots

No comments: