I am beginner in site development and made all changes in my main theme. Now I want to transfer it all into child theme and faced this question. Are examples below equal?

.entry-header-wrapper {

  //margin-bottom: 40px;


.entry-header-wrapper {

  margin-bottom: none;

  • // is not a valid way to comment in CSS, that will be a CSS 'error'. If you are asking how to override that element's margin-bottom in your child theme, then the stuff in your child theme's stylesheet will override the parent theme's, as long as the stylesheet is included after the parent's one. margin-bottom should be 0, not none, if you want there to be 0 margin.
    – Dan.
    Jul 27, 2017 at 7:54
  • The default (initial) value for margin-bottom is 0 see
    – Picard
    Jul 27, 2017 at 8:00

1 Answer 1


No. The first example is invalid CSS, the second one valid. In CSS, you can only comment with /* and */. If you are unsure, there are tools such as CSSLint or the W3C's CSS Validator to check your code.

Also setting a value to none or not setting the value at all is something different as well.

  • Thank you! One more question: .entry-footer { padding: 0 80px; } This was the first version. I changed it like that in parent theme: .entry-footer { } But how do I show this change in child theme, is it like this? .entry-footer { padding: none } Jul 27, 2017 at 7:56
  • 1
    @VladislavMakeev This is too much to explain here (also I voted to close your question, as it is off topic for this site, see What topics can I ask about here? - yours is a general CSS question). Short answer: .entry-footer {padding: 0;}. Long answer: Please properly learn CSS
    – kero
    Jul 27, 2017 at 8:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.