lab/exercise-css/josephlau2003/18-4 exercise/style-selector.css
/* Type selector styles */
h1 {
    color: red;
  }
  
  p {
    font-size: 16px;
  }
  
  /* Class selector styles */
  .text {
    color: blue;
  }
  
  .heading {
    font-weight: bold;
  }
  
  /* ID selector styles */
  #special-text {
    font-style: italic;
  }
  
  /* Specificity demonstration styles */
  .text#special-text {
    color: green;
    font-size: 24px;

  }
  .flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  
.flex-item {
    background-color: #ccc;
    padding: 20px;
    font-size: 30px;
    text-align: center;
    margin: 10px;
    flex-basis: calc(33.33% - 20px);
  }
  .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
  }
  
  .grid-item {
    background-color: #ccc;
    padding: 20px;
    font-size: 30px;
    text-align: center;
  }
  .container {
    position: relative;
    width: 600px;
    height: 400px;
    border: 1px solid black;
  }
  
  .box1 {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    background-color: red;
  }
  
  .box2 {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    background-color: blue;
  }
  
  .box3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    background-color: green;
  }
  
  .box4 {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background-color: yellow;
  }
  