Answers for "what does width 100% do css"

0

css 100% height

<!DOCTYPE html>
<html>
  <head>
    <title>100% height</title>
    <style>
      html,
      body {
        height: 100%;
        margin: 0;
      }
      .container {
        height: 100%;
        background: #000; /* to see the effect */
      }
    </style>
  </head>
  <body>
    <div class="container"></div>
  </body>
</html>
Posted by: Guest on June-13-2020
0

what does it mean when we write width :100%?

if you specify width:100%, the element's total width will be 100% of its containing block plus any horizontal margin, padding and border
Posted by: Guest on February-05-2021

Browse Popular Code Answers by Language