-2

When I try to navigate from one form to another form, background-color in css is not working.

login_form_success.php

<div class="alert alert-success">Welcome <?php echo $_SESSION['uname']; ?>Signed in !</div>

style.css

.alert alert-success{
    background-color: greenyellow;
}
bhuvana
  • 59
  • 6

2 Answers2

2

Your css sould be.

.alert.alert-success{
    background-color: green;
}

or

.alert.alert-success{
    background-color: yellow;
}
Dilip Hirapara
  • 14,810
  • 3
  • 27
  • 49
2

You need to replace the <space> with a . in your css:

.alert.alert-success{
    background-color: greenyellow;
}

https://css-tricks.com/multiple-class-id-selectors/

Teun
  • 916
  • 5
  • 13