- This topic has 12 replies, 3 voices, and was last updated 3 years, 10 months ago by David.
-
AuthorPosts
-
June 16, 2020 at 2:58 pm #1330550Randy
I love the subtle edge shadow effects on a site:
(if I can’t embed: https://snipboard.io/T5lPIO.jpg )
That’s on the “base page” — not within the content area. Probably not explaining it right, but on the right edge you can see the track of the browser “elevator”.
I tried this:
#page { -webkit-box-shadow:0px 5px 10px #1c1c1c; -moz-box-shadow:0px 5px 10px #1c1c1c; box-shadow:0px 5px 10px #1c1c1c; }
… but that adds a shadow to the content area of the page — the edge of the “contained” navbar/footer bar, not the edge of the browser page.
So, I’ve been trying and trying to do this without asking, but have come up empty. Thanks for any clue-by-four you can apply.
June 16, 2020 at 9:40 pm #1330757LeoStaffCustomer SupportHi there,
Can you link me to the example page in question?
June 18, 2020 at 4:20 pm #1333384RandyHeh! Couldn’t remember, since it’s not a site I frequent, but found it: https://gundigest.com
June 18, 2020 at 7:33 pm #1333457LeoStaffCustomer SupportLooks like it’s just using inset shadow:
box-shadow: inset 12px 0 35px -4px rgba(0,0,0,.2), inset -12px 0 35px -4px rgba(0,0,0,.2);
You can make you own using this site:
https://www.cssmatic.com/box-shadowJust choose the inset option at the bottom.
June 18, 2020 at 8:44 pm #1333490RandyThanks; I’m 2/3 of the way there. My CSS isn’t good enough to know what things are called, so had no clue about “inset”.
But the next part is, how do I place it on the “outer” part of the page? (The blue on the edges is my desktop):
(This is done with #page {…}, which clearly isn’t quite correct.)
June 18, 2020 at 9:27 pm #1333504RandyOK, that helped me do more research, and I have it in the right horizontal position:
body {box-shadow: inset 12px 0 20px -4px rgba(0,0,0,.2), inset -12px 0 20px -4px rgba(0,0,0,.2);
}So is there a way to omit it entirely from the header area? And/or not include it on the upper edge?
(I realize this is not necessarily GP-specific, so I appreciate the tips.)
June 19, 2020 at 1:42 am #1333693DavidStaffCustomer SupportHi there,
try this CSS:
body:after { content: ''; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; box-shadow: inset 12px 0 20px -4px rgba(0, 0, 0, .2), inset -12px 0 20px -4px rgba(0, 0, 0, .2); }
Make sure your Site Header has a solid background color.
June 19, 2020 at 9:39 am #1334366RandyThat CSS does mimic Leo’s results, but that’s the problem: there’s still stuff in the header area (i.e., above the navbar).
“Make sure your Site Header has a solid background color.”
I’m unclear what you mean by this. Is there css to be added? If so, I don’t know what: everything I’ve tried to white out the bg failed.
There is no graphical element there, just the site title/tag in text.
Just to make sure you’re understanding, I’m wanting the edge shadow effect to not apply in the header (i.e., above the navbar).
June 19, 2020 at 9:44 am #1334369DavidStaffCustomer SupportYou can set the Background color of the Site Header in Customizer > Colors > Header.
Do you have a link to your test site so i can take a look?June 19, 2020 at 10:00 am #1334386RandyIt’s already set to white, so that didn’t help. The shadow overlays the solid coloring.
It’s https://plugintest.cassingham.com — and I’m happy to give you admin access to the back end if that helps. You’ll just have to provide an email address to use for the account.
June 19, 2020 at 10:05 am #1334390DavidStaffCustomer SupportCan you set the Header to Full Width
June 19, 2020 at 12:32 pm #1334536RandyAh, that worked. Thanks, David (and Leo). Much appreciated.
June 20, 2020 at 4:03 am #1335156DavidStaffCustomer SupportGlad we could be of help
-
AuthorPosts
- You must be logged in to reply to this topic.