
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to set the bottom margin of an element?
The margin-bottom property is used to set the bottom margin of an element. It can have a value in length, % or auto.
Example
You can try to run the following code to set the bottom margin
<html> <head> </head> <body> <p style = "margin-bottom: 40px; border:2px solid yellow;"> Cricket crazy nation India! </p> <p style = "margin-bottom: 20%; border:2px solid yellow;"> Cricket crazy nation Australia! </p> </body> </html>
- Related Articles
- How to set the bottom margin of an element with JavaScript?
- How to set the left margin of an element with JavaScript?
- How to set the top margin of an element with JavaScript?
- How to set the right margin of an element with JavaScript?
- Set the right margin of an element with CSS
- Set the top margin of an element with CSS
- How to set the bottom padding of an element with JavaScript?
- Set the left, right, top and bottom padding of an element
- How to set the bottom position of a positioned element with JavaScript?
- Animate CSS margin-bottom property
- Usage of margin-bottom property with CSS
- How to Set The Footer Bottom Of The Page?
- How do I extend the margin at the bottom of a figure in Matplotlib?
- How to set margin of ImageView using code in Android?
- Specify the bottom padding of an element with CSS

Advertisements