

- 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 padding of an element with JavaScript?
To set the bottom padding, use the paddingBottom property in JavaScript.
Example
You can try to run the following code to return the bottom padding of an element with JavaScript −
<!DOCTYPE html> <html> <head> <style> #box { border: 2px solid #FF0000; width: 150px; height: 70px; } </style> </head> <body> <div id = "box">This is demo text.</div> <br> <br> <button type = "button" onclick = "display()">Bottom padding</button> <script> function display() { document.getElementById("box").style.paddingBottom = "100px"; } </script> </body> </html>
- Related Questions & Answers
- How to set the padding of an element with JavaScript?
- Specify the bottom padding of an element with CSS
- How to set the right padding of an element with JavaScript?
- How to set the left padding of an element with JavaScript?
- How to set the top padding of an element with JavaScript?
- Set the left, right, top and bottom padding of an element
- How to set the bottom margin of an element with JavaScript?
- How to set the bottom margin of an element?
- How to set the bottom position of a positioned element with JavaScript?
- How to set the height of an element with JavaScript?
- How to set the margins of an element with JavaScript?
- Specify the left padding of an element with CSS
- Specify the top padding of an element with CSS
- Specify the right padding of an element with CSS
- How to set the width of the bottom border with JavaScript?
Advertisements