Lecture 19 (Morning)

Assignment

Open 



Index.html:

<!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">
    <title>Document</title>
    <link rel="stylesheet" href="css/style.css">
</head>

<body>

    <div class="container">
        <!-- <div class="rec" style="order: 2;">
            1
        </div>
        <div class="rec" style="order: 3;">2</div> -->
        <!-- <div class="rec" style="order: 4;">3</div>
        <div class="rec" style="order: 1;">4</div> -->


        <!-- <div class="rec" style=" flex-basis: 200px;">1</div>
        <div class="rec" style="flex-grow: 3;">2</div> -->

        <div class="rec">1</div>
        <div class="rec" style="align-self: flex-start; background-color: blue;">2</div>
        <div class="rec" style="align-self: flex-start;">3</div>
    </div>
</body>

</html>

Style.css

.container {
  height: 500px;
  background-color: black !important;
  display: flex;

  padding: 10px;
  flex-flow: row wrap;
  justify-content: space-evenly;
  align-items: center;
  /* align-content: center; */
}

.rec {
  /* height: 200px; */
  /* width: 200px; */
  /* display: inline-block; */
  background-color: red;
  margin: 10px;
  /* line-height: 200px; */
  text-align: center;
  color: white;
  font-size: 30px;
  padding: 20px;
}

div {
  background-color: brown !important;
}

Comments