Try being explicit about all the border properties. For example:

border:1px solid black;

See Border shorthand property. Although the other bits are optional some browsers don't set the width or colour to a default you'd expect. In your case I'd bet that it's the width that's zero unless specified.

Answer from Paolo on Stack Overflow
🌐
W3Schools
w3schools.com › cssref › pr_border-color.php
CSS border-color property
accent-color align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function aspect-ratio backdrop-filter backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size block-size border border-block border-block-color border-block-end border-block-end-color border-block-
🌐
W3Schools
w3schools.com › css › css_border_color.asp
CSS Border Color
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
Discussions

css - How to set a border for an HTML div tag? - Stack Overflow
In other words, you need to set a border style (e.g. solid) for the border to show up. border:thin only sets the width. Also, the color will by default be the same as the text color (which normally doesn't look good). More on stackoverflow.com
🌐 stackoverflow.com
Change TD border color with HTML or CSS - Stack Overflow
I have a little trouble with changing one tr border color My table is something like this ... More on stackoverflow.com
🌐 stackoverflow.com
html - row border color - Stack Overflow
I want to set the border of to yellow. I can set the border of but can't figure how to set border of row . How to do this? Thanks. More on stackoverflow.com
🌐 stackoverflow.com
Why does changing the background-color of a <button> change its border and border radius and hover effects?
Buttons are a bit weird. They have a default styling that comes from the user-agent stylesheet (browser built in stylesheet) that is different from browser to browser. Most browsers completely remove the default styling when you create your own style, even if you’re just overriding one thing. The issue you’re facing is that there’s sometimes a second fallback that uses ”webkit-appearence: button;” which has a different styling. I remember this article from CSS tricks being a good read on how to normalize and style buttons More on reddit.com
🌐 r/css
25
5
December 26, 2024
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-color
border-color - CSS | MDN
2 weeks ago - /* <color> values */ border-color: red; /* top and bottom | left and right */ border-color: red #f015ca; /* top | left and right | bottom */ border-color: red rgb(240 30 50 / 70%) green; /* top | right | bottom | left */ border-color: red yellow green blue; /* Global values */ border-color: inherit; border-color: initial; border-color: revert; border-color: revert-layer; border-color: unset;
🌐
W3Schools
w3schools.com › html › html_table_borders.asp
HTML Table Borders
With the border-color property, you can set the color of the border.
🌐
Aspose
docs.aspose.com › aspose.html › .net › how-to articles › how to change border color
How to Change Border Color in HTML? C# Examples
April 11, 2023 - Use the GetElementsByTagName(name) method of the Element class that returns HTML element with a given tag name. Set the style attribute with border-style and border-color properties: use the Style property of the HTMLElement class.
Find elsewhere
🌐
HTML.com
html.com › attributes › table-bordercolor
Attributes for BORDERCOLOR = color expressionBORDERCOLORDARK = color expressionBORDERCOLORLIGHT = color expression
December 20, 2019 - Next, we’ll look at setting the light and dark shades of the border. The color of the table borders as a whole is set with the BORDERCOLOR attribute of the <TABLE> tag.
🌐
GeeksforGeeks
geeksforgeeks.org › css › css-border-color-property
CSS border-color Property - GeeksforGeeks
September 17, 2024 - The CSS border-color property allows developers to define the color of an element's border, enhancing the visual design of a webpage.
🌐
Mimo
mimo.org › glossary › css › border-color
CSS Border Color: Customize Element Edges
For this purpose, you can set border-top-color, border-right-color, border-bottom-color, and border-left-color. ... .newsletter { border-style: solid; border-width: 2px; border-top-color: red; border-right-color: blue; border-bottom-color: green; border-left-color: yellow; padding: 15px; }
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › border
border - CSS - MDN Web Docs - Mozilla
border = <line-width> || <line-style> || <color> <line-width> = <length [0,∞]> | thin | medium | thick <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset · html · <div>I have a border, an outline, and a box shadow!
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › utilities › borders
Borders · Bootstrap v5.3
That means anytime you use .border-success now, your computed color value is rgba(25, 135, 84, 1). The local CSS variable inside each .border-* class avoids inheritance issues so nested instances of the utilities don’t automatically have a modified alpha transparency. To change that opacity, override --bs-border-opacity via custom styles or inline styles. This is default success border · This is 50% opacity success border · html ·
🌐
SheCodes
shecodes.io › athena › 25486-how-to-add-a-border-background-color-to-html
[HTML] - How to add a border background color to HTML - | SheCodes
Learn how to use the CSS border and background-color properties to add a colored border to your HTML element
🌐
Screenstepslive
utah.screenstepslive.com › a › 1865460-basic-borders-and-line-properties
Basic Borders and Line Properties | Advanced HTML Elements | University of Utah
August 23, 2024 - By default, the border-color for a horizontal rule (<hr>) displays as a light grey line, and visible borders on other elements display as dark grey. If you want to change the color, simply use the style attribute and border-color property to indicate the desired color.
🌐
W3Schools
w3schools.com › jsref › prop_style_bordercolor.asp
HTML DOM Style borderColor Property
Two values, like: p {border-color: red transparent} - top and bottom border will be red, left and right border will be transparent
🌐
Fandom
coding-help.fandom.com › wiki › Borders
Borders | Coding Help Wikia - Fandom
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Computer Hope
computerhope.com › issues › ch001392.htm
How to Create a Colored Border Around Text with HTML and CSS
Then, you can link to this file from any HTML page, and elements in that document can use the CSS styles. For example, with the CSS code below, a new class named "borderexample" is created that can be applied to any HTML tag. <style> .borderexample { border-width:3px; border-style:solid; border-color:#287EC7; } </style>