Comments on: box-shadow https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Thu, 22 Sep 2022 21:57:18 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Love https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1763118 Thu, 24 Sep 2020 05:26:36 +0000 http://css-tricks.com/?page_id=13974#comment-1763118 In reply to Druid of Lûhn.

HTML SCSS Result
.box {
box-shadow:
0 2.8px 2.2px rgba(0, 0, 0, 0.034),
0 6.7px 5.3px rgba(0, 0, 0, 0.048),
0 12.5px 10px rgba(0, 0, 0, 0.06),
0 22.3px 17.9px rgba(0, 0, 0, 0.072),
0 41.8px 33.4px rgba(0, 0, 0, 0.086),
0 100px 80px rgba(0, 0, 0, 0.12)
;

min-height: 200px;
width: 50vw;
margin: 100px auto;
background: white;
border-radius: 5px;
}

body {
background: #EEF2F7;
}

]]>
By: Dan https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1758825 Fri, 03 Jul 2020 19:05:41 +0000 http://css-tricks.com/?page_id=13974#comment-1758825 Tried effect 2, z-index:-1 on pseudo elements didn’t show anything, z-index:0 works but it’s on top. Maybe something about ancestors stacking context? I can’t really change the ancestors, only the element & parent :(

]]>
By: Salehin https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1651696 Thu, 23 Aug 2018 17:52:55 +0000 http://css-tricks.com/?page_id=13974#comment-1651696 Hey Keith, you can read this article (https://fluentthemes.com/create-box-shadow-css/) which I found very helpful to learn Box-Shadow in detail. Specially the Syntax provided there is just too handy.

]]>
By: sushmitg https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1614014 Wed, 27 Dec 2017 12:57:55 +0000 http://css-tricks.com/?page_id=13974#comment-1614014 In reply to sushmitg.

this is what happens is you change position from relative to fixed:

]]>
By: sushmitg https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1614013 Wed, 27 Dec 2017 12:56:52 +0000 http://css-tricks.com/?page_id=13974#comment-1614013 how to get the 4th effect on top fixed navbar ?

]]>
By: CC https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1613580 Wed, 06 Dec 2017 15:41:56 +0000 http://css-tricks.com/?page_id=13974#comment-1613580 hi I’m using this code on my site to highlight images on hover, but some of the boxes are not showing correctly. Maybe because they are different sizes??

here’s the code I’m using,

.border img {
  width: 300px;

-webkit-transition: all 1s ease;
     -moz-transition: all 1s ease;
       -o-transition: all 1s ease;
      -ms-transition: all 1s ease;
          transition: all 1s ease;
}

.border img:hover {
  width: 400px;  
}

and here’s the rest of the code… its doing exactly what i want when its a square box. If can get it to work on anysize box, that would be great

.border:hover {
        box-shadow: inset 0 0 0 25px #fcdfff;
}

Is there an easy way to make the shadow conform to the size of the box… this is probably happening because if have a hard coded with, and when the box is a different size maybe the shadow isnt working… please hover on

weavekingdom.com where you can see the affect when you hover on the images in the grid (hover images below the slideshow and below the categories)

]]>
By: Emunot Daniel https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1612793 Wed, 01 Nov 2017 23:27:58 +0000 http://css-tricks.com/?page_id=13974#comment-1612793 In reply to Johnna Roberts.

I had the same issue, here’s what I did:

Get the parent container with bg color.
Give it “position: relative” and “z-index: -1”

That worked for me.

]]>
By: Miguel https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1605878 Sun, 01 Jan 2017 09:32:40 +0000 http://css-tricks.com/?page_id=13974#comment-1605878 Hello people from earth, I am from another world. but I want to learn html an css =P
my question is about the effect 2, Is it possible to do that with a youtube videoplayer, Thanks in advances! xD

]]>
By: BJS-STUDIO https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1605262 Tue, 29 Nov 2016 06:30:49 +0000 http://css-tricks.com/?page_id=13974#comment-1605262 Very good, thank you

]]>
By: Vlretail https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1604612 Tue, 18 Oct 2016 13:11:57 +0000 http://css-tricks.com/?page_id=13974#comment-1604612 Multiple borders .. I really like that one

]]>
By: Anon https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1602475 Sun, 26 Jun 2016 07:38:10 +0000 http://css-tricks.com/?page_id=13974#comment-1602475 In reply to endüstriyel temizlik ürünleri.

Cute

]]>
By: azad https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1602369 Wed, 22 Jun 2016 10:58:59 +0000 http://css-tricks.com/?page_id=13974#comment-1602369 its good

]]>
By: Peter https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1596291 Wed, 05 Aug 2015 11:07:52 +0000 http://css-tricks.com/?page_id=13974#comment-1596291 In reply to Deryn.

And me too…

]]>
By: Johnna Roberts https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1594764 Wed, 20 May 2015 04:31:35 +0000 http://css-tricks.com/?page_id=13974#comment-1594764 I am using shadow effect 5 and I really like all the different shadow effects. But I cannot figure out to make my web page body a different color and keep the white color in my wrapper. When I try to do this I lose the shadow completely. I have tried adding a z-index to my wrapper but that did not change anything. Any ideas or suggestions on how to do this would be greatly appreciated.

Here is my wrapper code for the wrapper…

.wrapper {
background-color: #ffffff;
color: #000000;
margin: 0 auto;
padding: 0;
text-align: left;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

Johnna

]]>
By: Felix Rizo-Patron https://css-tricks.com/almanac/properties/b/box-shadow/#comment-1592904 Tue, 03 Mar 2015 09:00:34 +0000 http://css-tricks.com/?page_id=13974#comment-1592904 In reply to Felix Rizo-Patron.

Hi Wayne thank you very much for the testing and the replying. At the end I just took the shadows away. I am also happy that way; no need to look further. Here is the page: http://www.empiresofevil.tv
yes, cheers for you to!

]]>