Usage of margin-bottom property with CSS

JavascriptWeb DevelopmentFront End Scripts

The margin-bottom specifies the bottom margin of an element. It can have a value in length, % or auto. You can try to run the following code to set the bottom margin:


      <p style = "margin-bottom: 20px; border:2px solid red;">
         This is a paragraph with a specified bottom margin .
      <p style = "margin-top: 20%; border:2px solid green;">
         This is another bottom with a specified top margin in percent
Published on 17-Apr-2018 14:16:13