Forums

Same style for parent and child page (2 posts)

  1. stephen77
    Member
    Posted 1 year ago #

    Hello peoples! I'm having a sort of a problem here... I have a menubar with 8 main pages. Three of those pages show a different colored menubar if the visitor clicks on it. I set the color of the parent page menubar in style.css with .page-id-23 #access {blabala}.
    If I add submenu's to any of the colored parent pages. The submenu shows up in the default color green. It does not show up in the color of the parent page. I would like to know how it would be possible to add a subpage in the admin panel (because it is for a cliƫnt) showing up with the same menubar color as the parent page.

    I can also write extra css for the subpages(.page-id-23 #access {blabala}), but then I have to create the subpages first. I do not want that ofcourse. There is a way to create the subpages and having the same colored menubar as the parent page. But how....Can anyone help me out.....?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Three options spring to mind:

    1. You could style on .parent-pageid-(id)

    2. You could create custom templates for child pages (or even and entire page tree) and style on
    .page-template-(template file name)

    3. You could add CSS to header.php based on the page parent id.

Topic Closed

This topic has been closed to new replies.

About this Topic