Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.1 kB
3
Indexable
Never
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="q2.css">
    <title>Document</title>

    <style>
        * {
            margin: auto;
        }
        /* main {
    display: flex;
    flex-direction: column;
    /* width: 100%;
} */
        
        .container {
            margin-top: 10px;
            display: flex;
            gap: 8px;
            margin: 10px;
            width: 70%;
        }
        
        .firstLine {
            background-color: darkgray;
            flex-grow: 1;
            padding: 5px;
        }
        
        .secondLine {
            width: 100%;
            height: 100px;
            background-color: darkgray;
            padding: 5px;
            flex-grow: 1;
        }
        
        #parent {
            display: flex;
            flex-direction: column;
        }
        
        #child1 {
            padding: 5px;
            flex-grow: 1;
            background-color: white;
            gap: 5px;
            margin: 5px;
        }
        
        #child2 {
            display: flex;
            justify-content: flex-start;
            gap: 5px;
            margin: 5px;
            flex-grow: 1;
        }
        
        #child2 div {
            background-color: white;
            flex-grow: 1;
            padding: 5px;
        }
    </style>
</head>

<body>
    <main>
        <div class="container">
            <div class="firstLine">A</div>
            <div class="firstLine">B</div>
        </div>

        <div class="container">
            <div class="secondLine">C</div>

            <div id="parent" class="secondLine">
                <div id="child1">E</div>
                <div id="child2">
                    <div>F</div>
                    <div>G</div>
                </div>
            </div>
        </div>
    </main>
</body>

</html>