CSS Invalid Property Value

1

Well I've been doing a project that I found in an online course and all very well, but, I need to center a button. In the video they use the following lines:

div.resumen input{
  display: block;
  margin-bottom:  10px auto;
}

In the tutorial it works but when I execute it, it appears

"Invalid Property Value"

Can someone tell me why it happens and how to fix it?

    
asked by Gianna Cardenas 28.02.2018 в 01:25
source

2 answers

1

It's true, you're passing two values to margin bottom, what you could do is set a value for margin bottom within margin:

div.resumen input{
  display: block;
  margin: 0px 0px 10px 0px auto; /*top - right - bottom - left - auto*/
}

Epero serves you.

    
answered by 14.03.2018 в 14:19
0

You are setting 2 values to margin-bottom that only a value can take: a length, a percentage or auto . But only one of them. Then the correct thing would be:

div.resumen input{
  display: block;
  margin-bottom:  10px; /* quitando el auto */
}

This error can occur because instead of margin-bottom what you want to change is margin (which does admit 1-4 values) or that before there was a margin and now it is only margin-bottom (it happened to me several times changing CSS code: S).

Sources:

answered by 28.02.2018 в 01:37