The Catechism in Questions & Answers

328. Does the Fourth Commandment also imply certain duties for the parents?

Yes. In their lifestyle and in their duty to raise the children, parents carry a great responsibility and are to see to it, through their own God-pleasing conduct, that they do not make it difficult for their children to esteem their parents. If parents do not fulfil these duties, they cannot expect obedience from their children either.
Under no circumstances can the Fourth Commandment be used to justify a child’s duty to obey if such obedience would result in a violation of a divine commandment by either the parents or the child.