Bug with CSS Padding Shorthand

There is an error with the shorthand property of 7/16 on Learn CSS
Did you set the padding of h2 element to 20 pixels on the top and bottom and 30 pixels on the left and right? This should be done in one line.
I followed the directions, using this code below
padding: 20px 30px 20px 30px;
https://www.codecademy.com/courses/learn-css/lessons/box-model-intro/exercises/box-padding-shorthand
And the error shows when running.
I placed it correctly in there, following all steps from the lesson.
is this a bug with Codecademy?
Thanks
BRYCE M

Hi @digital3507156218
Maybe the lesson wants you to take full advantage of the shorthand syntax. You can achieve the desired padding by writing

padding: 20px 30px;

If you only set two values with the shorthand property the first is taken for the y coordinates and the second is taken for the x coordinates.

Thank you! it works!

1 Like