Site logo

Archived topic

Merge Top Bar and Main Menu with header slider

15 replies · Started by Katharina on July 9, 2017

Viewing posts 1–15 of 16

Hi there,

i have i few questions:
i added a slider instead of the header image with this code i found here in the forum:

GP Hooks before header:

<?php if ( is_page( 16 ) ) : ?>
[metaslider id=25]
<?php endif; ?>

Custom CSS:
.page-id-16 .site-logo {
display: none;
}

That works great.
Now i want to

1: Merge the top bar and the main menu with the slider and set a transparent background, so that both of them are situated on the top / right side of the slider

2: overlap the main container the slider a little bit (can i send you my screendesign somehow?).

thank you!

Katharina

You should be able to re-create that exact look using the Page Header and then some CSS for the main content area.

If you can link me to your page using the page header add-on, I should be able to help :)

Great, thank you.

The Menu and Top bar work good on the slider (didn't know, that the top bar can also merge with the page header add on, that's perfect!) so only thing missing is the overlap of the main content area. am i still able to use sections then?

here the link:

http://www.energieeffizienz.tirol?bypass=optimal

if you need access to my dashboard i would send the per email.

You could do something like this:

#page {
    margin-top: -100px;
    z-index: 9999;
    position: relative;
}

However it would require your page header to be wider than the content (full width etc..) in order to see the effect.

unfortunatley it doesn't work out.

I played around with the settings (full width, contained,) but the only effect i reach is the opposite of what i wanted :). The content ist full width but i never achieve to have the slider full width.

So if i change the page header from contained to fullwidth nothing happens.
If i change the page builder content from contained to full width i see the difference but only the content, the slider stays contained.

Can you set your page header to be full width so I can see why the slider is staying contained?

Try adding this CSS:

.generate-combined-content.grid-container {
    max-width: 100%;
}

that's it. Thank you very much!!!

Katharina

You're welcome :)

Hi, i'm sorry, but i recognized now, that this doesn't work on mobile devices. On small screens, the main content overlaps nearly the whole slider-image.

So i tryd to add:

@media (min-width: 64em)
#page {
margin-top: -100px;
z-index: 9999;
position: relative;
}

with the effect that the whole other css becomes neutralized.
Is this the wrong code, or did i put it on the wrong place?

thank you
Katharina

Try this:

@media (max-width:768px) {
    #page {
        margin-top: 0;
    }
}

Perfect. Thanks!

This archived topic is closed to new replies.