- This topic has 11 replies, 3 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
April 17, 2019 at 11:07 am #871872
Florian
Hey,
I want to add a box-shadow to the whole middle part, but when I add it to the “content” area, the shadow is not applied to the primary menu (see https://i.imgur.com/cuwHcDv.png).
Can you tell me how I can target the whole middle part including the menu bar?GeneratePress 2.2.2GP Premium 1.7.8April 17, 2019 at 11:09 am #871877Leo
StaffCustomer SupportHi there,
What about this?
.one-container .site-content { border: 1px solid #000; }
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2019 at 11:22 am #871904Florian
Hey, this also leaves out the menu bar, similar to the previous approach.
April 17, 2019 at 12:17 pm #871935Leo
StaffCustomer SupportMaybe I’m not quite sure what you are trying to achieve.
Are you trying to add border on top of the menu bar?
If so we will need to take a different approach as there is currently no space there for anything to show.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2019 at 12:31 pm #871947Florian
You can see it in the image link I posted. I want a shadow on the right and left side of the content area, but it’s leaving out the header.
April 17, 2019 at 2:47 pm #872020Leo
StaffCustomer SupportTry this adding this CSS as well:
.site-header { box-shadow: 0 0 30px 1px rgba(0,0,0,.1); }
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 1:39 am #872318Florian
I already tried this, but this also adds a shadow to the bottom of the header which is then over the body.
April 18, 2019 at 2:55 am #872363David
StaffCustomer SupportHi there,
it would require you to add a Wrap around the nav and the content to do that.
You would create 2 Hook Elements.First hook
Content:
<div class="shadow-wrap grid-container"> <!-- open wrap -->
Note: the editor will add the closing
</div>
– delete it.
Hook:before_header
Priority:0
Second hook
Content:
<!-- close wrap --></div>
Hook:before_footer
Priority:10
DefaultBoth hooks you will want to set the Display Rules to Entire Site.
Then you can target the
shadow-wrap
class for your CSSDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 3:33 am #872376Florian
Thank you. Can you tell me how exactly that code would look like? I guess I have to put it into funtions.php?
April 18, 2019 at 3:39 am #872378David
StaffCustomer SupportYou can use the Elements module:
https://docs.generatepress.com/article/hooks-element-overview/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 3:50 am #872389Florian
That worked perfectly! Thank you!
April 18, 2019 at 3:54 am #872391David
StaffCustomer SupportAwesome – glad to be of help.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.