

- 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 color of the rule between columns with JavaScript?
Use the columnRuleColor property in JavaScript to set the color of the rules. You can try to run the following code to set the color of the rule between columns with JavaScript −
Example
<!DOCTYPE html> <html> <head> <style> #myID { column-count: 4; column-rule: 4px outset yellow; } </style> </head> <body> <p>Click below to change color</p> <button onclick="display()">Change Color between Columns</button> <div id="myID"> This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </div> <script> function display() { document.getElementById("myID").style.columnRuleColor = "red"; } </script> </body> </html>
- Related Questions & Answers
- Set the color of the rule between columns with CSS
- How to set the style of the rule between columns with JavaScript?
- How to set the width of the rule between columns with JavaScript?
- Set the style of the rule between columns with CSS
- Set the width of the rule between columns with CSS
- How to set the gap between the columns with JavaScript?
- How to set the column rule properties with JavaScript?
- How to set the color of the left border with JavaScript?
- How to set the color of the right border with JavaScript?
- How to set the color of the text-decoration with JavaScript?
- How to set the color of the top border with JavaScript?
- How to set the color of an elements border with JavaScript?
- How to return or set the width of the columns with JavaScript?
- How to set the color of the outline around an element with JavaScript?
- How to set outline color with JavaScript?
Advertisements