- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
How to set the color of the bottom border in JavaScript DOM?
To set the color of the bottom border in JavaScript, use the borderBottomColor property. It allows you to set the border color for the bottom of a border.
Example
You can try to run the following code to learn how to set the color of the bottom border −
<!DOCTYPE html> <html> <head> <style> #box { border: 2px dashed blue; width: 120px; height: 120px; } </style> </head> <body> <button onclick="display()">Set border bottom color</button> <div id="box"> <p>Demo Text</p> <p>Demo Text</p> </div> <script> function display() { document.getElementById("box").style.borderBottomColor = "yellow"; } </script> </body> </html>
- Related Articles
- How to set all the border bottom properties in one declaration in JavaScript DOM?
- How to set the width of the bottom border with JavaScript?
- How to set the style of the bottom border with JavaScript?
- How to set the color of the top border with JavaScript?
- How to set the color of the right border with JavaScript?
- How to set the color of the left border with JavaScript?
- How to set the color of an elements border with JavaScript?
- Change the color of the bottom border with CSS
- How to set border width, border style, and border color in one declaration with JavaScript?
- How to set the border color of certain Tkinter widgets?
- Usage of border-bottom-color property in CSS
- Set the style of the bottom border using CSS
- Set the color of the border with CSS
- How to set the border color of the dots in matplotlib's scatterplots?
- Set the color of the right border using CSS

Advertisements