padding-bottom



значения свойства:


  • 0
  • size
  • %
  • inherit



css/style.css
  • * {
  •  margin: 0;
  •  padding: 0;
  • }
  •  
  • .a, #p1, .b {
  •  width: 300px;
  •  height: 50px;
  •  margin: 30px 0 30px 30px;
  •  background-color: #7092BE;
  • }
  •  
  • .a {
  •  padding-bottom: 5px;
  • }
* {
 margin: 0;
 padding: 0;
}

.a, #p1, .b {
 width: 300px;
 height: 50px;
 margin: 30px 0 30px 30px;
 background-color: #7092BE;
}

.a {
 padding-bottom: 5px;
}


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <p class="a">To be or not to be?</p>
  •  <p id="p1">To be or not to be?</p>
  •  <p class="b">To be or not to be?</p>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("p1").style.paddingBottom = "20px";
  •  /*jQuery*/
  •  $(document).ready(function () {
  •   $(".b").css({ "padding-bottom": "50px" });
  •  });
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <p class="a">To be or not to be?</p>
  •  <p id="p1">To be or not to be?</p>
  •  <p class="b">To be or not to be?</p>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("p1").style.paddingBottom = "20px";
  •  /*jQuery*/
  •  $(document).ready(function () {
  •   $(".b").css({ "padding-bottom": "50px" });
  •  });
  • </script>
  • </body>
  • </html>