- This topic has 34 replies, 3 voices, and was last updated 6 years, 11 months ago by
Leo.
-
AuthorPosts
-
April 23, 2019 at 9:12 am #876758
Karel
I’m sorry again for all that misunderstanding … to make it all clear i will share a pic of what i want to do.
April 23, 2019 at 9:19 am #876763Leo
StaffCustomer SupportCan you add the code here and I’ll try to tweak it so it’s more like the screenshot above?
https://generatepress.com/forums/topic/disable-header-on-mobile/#post-875196April 23, 2019 at 9:40 am #876790Karel
Okey I´ve uploaded this
@media (max-width: 768px) {
.single .page-hero {
background-image: none;
}
}April 23, 2019 at 12:05 pm #876888Leo
StaffCustomer SupportI see that you are using CSS to set the page hero height:
@media (max-width: 768px) { .page-hero { min-height: 730px; max-height: 800px; } } .page-hero { height: 675px; box-sizing: border-box; }Can you try using the built-in padding options? It also has mobile options and will work better:
https://docs.generatepress.com/article/header-element-overview/#paddingThen we should only need to align the content to the left.
Let me know 🙂
April 24, 2019 at 10:21 am #877931Karel
Okey I have deleted them, played with padding little bit + added
@media(max-width: 768px){
.single .inside-page-hero {position:absolute;top:17vh}}Anyway:
Grey Background around heading+meta
The text needs to be aligned to the left
And I would like to have identical space around Heading, it should not matter how many words the heading have.Thank you for any advice and help Leo 🙂
April 24, 2019 at 12:01 pm #878046Leo
StaffCustomer SupportLooks like you have this CSS added as well?
@media (max-width: 768px) .single .inside-page-hero { top: 17vh; display: block; } @media (max-width: 768px) .inside-page-hero { position: fixed; left: 0; top: 30vh; height: 400px; min-width: 100%; max-width: 70%; display: block; }Can you remove that?
April 25, 2019 at 7:56 am #879276Karel
Both deleted.
April 25, 2019 at 9:05 am #879364Leo
StaffCustomer SupportYou also have this CSS which is causing the issue:
.inside-page-hero { position: fixed; left: 0px; top: 280px; height: 400px; min-width: 100%; max-width: 70%; display: block; box-sizing: border-box; }Can you basically delete all the CSS related to the page hero for now? Almost all of the thing can be accomplish with the built-in options.
April 25, 2019 at 9:28 am #879396Karel
Done, I had those styles to keep H1 fixed and fading with opacity ( I wanted that for Main page & posts in desktop mode ).
April 25, 2019 at 10:11 am #879440Leo
StaffCustomer SupportThose CSS makes it really hard to tweak things.
Do you want to adjust the padding so it looks like what you want? I don’t think 50% padding works:
https://www.screencast.com/t/X7UzWjviuZOpYou would also just the full-screen option as well.
April 25, 2019 at 10:35 am #879465Karel
Okey padding-bottom is now 0 , full-screen is set.
April 25, 2019 at 11:01 am #879490Leo
StaffCustomer SupportGetting closer 🙂
Now add some top and bottom padding with mobile toggle on:
https://docs.generatepress.com/article/header-element-overview/#page-heroThen try the adjusted CSS here:
@media (max-width: 768px) { .single .page-hero { background-image: none; background-color: #000000; min-height: unset; text-align: left; } }April 25, 2019 at 11:29 am #879530Karel
Okey mobile padding-top: 5% , bottom: 0.
April 25, 2019 at 11:34 am #879536Leo
StaffCustomer SupportOk so looks like we are basically there?
Just add
text-align: left;to this CSS you already have:@media (max-width: 768px) { .hero-headline { font-size: 40px; display: block; font-family: Josefin Sans; font-weight: 600; line-height: 40px; color: #ffffff; min-width: 100%; box-sizing: border-box; } }April 25, 2019 at 12:06 pm #879573Karel
Yeah almost,
I have put it like this
@media (max-width: 768px) {
.single .hero-headline {
font-size: 40px;
display: block;
font-family: Josefin Sans;
font-weight: 600;
line-height: 40px;
color: #ffffff;
min-width: 100%;
box-sizing: border-box;
text-align:left
}
}Because without .single it is affecting my front page but i would like to keep front page as full screen.
-
AuthorPosts
- You must be logged in to reply to this topic.