- This topic has 6 replies, 3 voices, and was last updated 1 year, 7 months ago by
Elvin.
-
AuthorPosts
-
November 9, 2020 at 7:50 am #1524079
prakshah
Hi guys,
Please excuse me if this request is out of scope. You guys have been so helpful in past, so thought of asking this.
I am designing the “header” of a website. I understand how to put an image at the background and then an overlay text.
But is there a possibility of putting the “text” in a box. I am putting the example of the header in the link below.
and the website I am trying to implement is also provided.
If possible please let me know!
Cheers!
November 9, 2020 at 7:57 am #1524089prakshah
The white box is the box I am talking about. It sits above the image and below the text.
November 9, 2020 at 9:49 am #1524249Leo
StaffCustomer SupportHi there,
Just to confirm, you are trying to create this thing here?
https://www.screencast.com/t/hcdANJbDqAre you trying to do this in the place of “Let’s Make The World a Better Place BUY CRUELTY-FREE. BUY VEGAN.”?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 9, 2020 at 5:00 pm #1524648prakshah
Hi,
The way I am using header gives me an option to create something like this (attached in the link). But as you can see the text is not in a box here. I just need the text – the post title and any meta, into a white box which is not spanning across the full width (as you can see its limited.
November 9, 2020 at 5:51 pm #1524688Elvin
StaffCustomer SupportHi,
You can try styling the current DOM structure with this.
.inside-page-hero.grid-container.grid-parent { padding: 30px; margin: 50px auto; max-width: 600px; background: white; color: black; }
Alternatively, you can modify the Header’s markup by wrapping your text in a
<div>
and apply the background on that div wrapper.Example:
<div class="page-hero-text-wrap"> <h1 class="entry-title">....</h1> <div class="hero-meta>...</div> </div>
And apply this CSS class to it:
.page-hero-text-wrap{ padding: 30px; margin: 50px auto; max-width: 600px; background: white; color: black; }
Here’s how either of the 2 would look like – https://share.getcloudapp.com/OAuJXgEZ
A wise man once said:
"Have you cleared your cache?"November 11, 2020 at 8:12 am #1527018prakshah
Hi, Thanks. But with this the while box extends to the full width of the mobile. Thus, nothing is visible. Can we make the width of white bux as 60% for both mobile and desktop?
November 11, 2020 at 12:00 pm #1527329Elvin
StaffCustomer SupportHi, Thanks. But with this the while box extends to the full width of the mobile. Thus, nothing is visible. Can we make the width of white bux as 60% for both mobile and desktop?
Sure thing.
Simply change the
max-width: 600px;
value tomax-width: 60%;
from the CSS code provided on the previous reply.A wise man once said:
"Have you cleared your cache?" -
AuthorPosts
- You must be logged in to reply to this topic.