Apologies if this is kinda vague. I am attempting to edit a theme I have purchased, and I am having trouble making the changes appear on my site. I have created a child theme and would like to override some CSS attached to the header. When inspecting the header element I find there is some CSS attached:

.cms-index-index .page-header.type3 {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    background-color: rgba(0,0,0,.5);
    width: 100%;
    max-height: 100%;

When searching my the theme for this CSS, I found it twice, once in magento2\app\code\Smartwave\Porto\etc\import\pages.xml and again in the file magento2\app\design\frontend\Magento\Porto Theme\app\code\Smartwave\Porto\etc\import\pages.xml.

My assumption is that I need to create a copy of one of these files in my new child theme to override it.

My question is, which of these files should I be duplicating, and after making those edits, what would be the correct procedure for making the edits appear on my site?

1 Answer 1


I suggest you don't Edit anything directly in your theme because whenever you updated your theme with latest version you will lose all your work.Therefore I will suggest you to create a child theme of your current theme. Here is a good tutorial for it. I suggest you please read it.

  • Is this tutorial assuming I am using the Magento theme as a parent, or it will work with any parent theme?
    – KillahB
    Jun 6, 2016 at 4:49
  • Yes it will work with any parent theme
    – Arunendra
    Jun 6, 2016 at 4:49
  • Alright, sweet. I have done this, seems to be working. Will edit question to suit.
    – KillahB
    Jun 6, 2016 at 5:35
  • If it's help you, then don't forget to accept this answer.
    – Arunendra
    Jun 6, 2016 at 5:37
  • I mean, it was a helpful tutorial, but it doesn't exactly answer the question. Thanks a lot, though. I do appreciate the help.
    – KillahB
    Jun 6, 2016 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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