Site logo

Archived topic

Hook one content-div inside second all-width div

1 reply · Started by Volodymyr on January 30, 2019

Viewing posts 1–2 of 2

Hi! What the best code for that hook https://imgur.com/a/mljmpc0 ? On img: we need one div (blue) on content width inside second div (green on 100% width).

Hi there,

any reason not to use the Header Element - which does that kind of thing?
https://docs.generatepress.com/article/header-element-overview/

If no good then use after_header hook.

You Markup would look something like this:

<div class="green-wrap">
    <div class="blue-container grid-container">
        <!-- markup in here -->
    </div>
</div>

The hook will automatically fit 100% wide.
The grid-container class is a GP Class and will size the green container to match the sites container size.

This archived topic is closed to new replies.