
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- 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
- Usage of margin-bottom property with CSS
- Animate CSS margin-bottom property
- How to set the bottom position of a positioned element with JavaScript?
- Specify the bottom padding of an element with CSS
- How do I extend the margin at the bottom of a figure in Matplotlib?
- How to set the width of an element in JavaScript?
- How to set the height of an element with JavaScript?
Advertisements