محتوى الدورة
Learn CSS In Arabic 2021
وصف الدرس

ال Code الموجود في الدرس

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>CSS</title>
    <link rel="stylesheet" href="css/master.css" />
  </head>
  <body>
    <h3>Flex</h3>
    <div class="flex">
      <div>One</div>
      <div>Two</div>
      <div>Three</div>
      <div>Four</div>
    </div>
    <hr />
    <h3>Float</h3>
    <div class="float">
      <div>One</div>
      <div>Two</div>
      <div>Three</div>
      <div>Four</div>
    </div>
  </body>
</html>
/*
  Flexible Box
  For Parent
  - display: flex => To Start Flexible Box
  - flex-direction: row => Default Value
  - flex-wrap: nowrap => Default Value
  - flex-flow: [Flex-Direction] + [Flex-Wrap]
*/

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.flex {
  background-color: #eee;
  width: 600px;
  padding: 20px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
}
.flex div {
  background-color: #f00;
  color: white;
  width: 25%;
  text-align: center;
  padding: 20px;
}
.float {
  overflow: hidden;
  background-color: #eee;
  width: 600px;
  padding: 20px;
  margin: 20px auto;
}
.float div {
  background-color: #f00;
  color: white;
  float: right;
  width: 25%;
  text-align: center;
  padding: 20px;
}