css pseudo classes and div style

Abiel de Groot
Abiel de Groot used Ask the Experts™
Hi all,

Trying to change the properties of Js_CardColmns_On but only the text changes. I want the background-color and border to change too.

Any help, much appreciated.

/* unvisited link */
.Js_CardColmns_On a:link {
    color: #FF0000;
      background-color: #FF0000 !important;
      border: 6px solid #FF0000;

/* visited link */
.Js_CardColmns_On a:visited {
    color: #00FF00;
      background-color: #605858 !important;
      border: 6px solid #605858;

/* mouse over link */
.Js_CardColmns_On a:hover {
    color: #FF00FF;
      background-color: #D0BA26 !important;
      border: 6px solid #D0BA26;

/* selected link */
.Js_CardColmns_On a:active {
    color: #0000FF;
      background-color: #0089CC !important;
      border: 6px solid #0089CC;


                  <div class="Js_CardColmns_On">
                  <a href="../REG_IMG_MGT/Tr_Update_Profile_Pic.asp?123">
                                    <i class="fas fa-id-card fa-4x"></i>
                                    Some Text
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
By default, <a> tags are displayed as inline, so you'll need to change it so they display as a block-level element. Add the following to your CSS and see how you get on:

.Js_CardColmns_On a {
    display: inline-block;

Open in new window

Abiel de GrootDeveloper


Many thanks Chris … that did it.   :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial