Home > OS >  Style is not applying properly [closed]
Style is not applying properly [closed]

Time:10-06

The following is my CSS which I've stored in a css file and it seems like it's not working properly, display:block is being ignored for input and label.

 form{
  max-width:500px;
  
  margin:2rem auto;
  border:2px solid #B1E26C;
  padding:2rem;
  label{
       display:block;   
          }
  input{
       display:block;    
           }
     }

CodePudding user response:

It is Sass, Do you have Sass compiler? If not write it in css foramt :

    form {
       max-width: 500px;
       margin: 2rem auto;
       border: 2px solid #b1e26c;
       padding: 2rem;
    }
    label {
      display: block;
    }
    input {
     display: block;
   }

CodePudding user response:

Change your code to this.

form {
    max-width: 500px;
    margin: 2rem auto;
    border: 2px solid #b1e26c;
    padding: 2rem;
}
label {
    display: block;
}
input {
    display: block;
}
  • Related