Q:

How to change Text color in Div without changing border color

<div class = "signupsubmit">Continue</div>
<style>
.signupsubmit {
        line-height: 32px;
        position: absolute;
        left: 36px;
        top: 527px;
        font-family: arial;
        font-size: 17px;
        font-weight: 600;
        width: 137px;
        height: 30px;
        border-color: #00297A;
        border-radius: 4px;
        border: 1px;
        border-style: solid;
        background-color: #FFB630;
        text-indent: 30px;
        }
</style>

I am trying to change the text color to black but keep the border color the same so this is what I did
 <div class = "signupsubmit">Continue</div>
<style>
.signupsubmit {
        line-height: 32px;
        position: absolute;
        left: 36px;
        top: 527px;
        font-family: arial;
        font-size: 17px;
        font-weight: 600;
        width: 137px;
        height: 30px;
        border-color: #00297A;
        border-radius: 4px;
        border: 1px;
        border-style: solid;
        background-color: #FFB630;
        text-indent: 30px;
        color: white; <!-- NEW LINE OF CODE -->
        }
</style>

I did color:white, but it also changed the border color to white too. I want to keep the border color black.

A:

When you use a shorthand property, such as border, all the unspecified properties are set to their default (initial) value. In this case, the default border-color is currentColor, which picks up whatever the current color is--in this case white. You can solve this problem by either explicitly specifying the color in the border shorthand property specification, as suggested in other answers, or merely change border: 1px; to border-width: 1px;.
For information on how shorthand properties, work, see the MDN page:

A value which is not specified is set to its initial value. That sounds anecdotal, but it really means that it overrides previously set values.

A:

What worked for me is combining the border properties into 1 line using the shorthand syntax...

.signupsubmit {
    line-height: 32px;
    position: absolute;
    left: 36px;
    top: 527px;
    font-family: arial;
    font-size: 17px;
    font-weight: 600;
    width: 137px;
    height: 30px;
    border: 1px solid #00297A;
    border-radius: 4px;
    background-color: #FFB630;
    text-indent: 30px;
    color: white; <!-- NEW LINE OF CODE -->
}
<div class = "signupsubmit">Continue</div>

