It’s the first time you create a child-theme? Because it’s always the same problem with child-themes, WordPress call always the main style.css file after the style.css file of the child-theme, this will overwrite always the styles from the child-theme. Just check Google how many people have problems with that. You should use child-themes only if you know what you do or if you know how to code css, also to overwrite existing css rules.
The code above is not saved in the child theme, I don’t even know where it is coming from.
Where have you found the code?