- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Usage of margin-bottom property with CSS
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:
Example
<html> <head> </head> <body> <p style = "margin-bottom: 20px; border:2px solid red;"> This is a paragraph with a specified bottom margin . </p> <p style = "margin-top: 20%; border:2px solid green;"> This is another bottom with a specified top margin in percent </p> </body> </html>
Advertisements