Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS What is wrong with this box-shadow in my live project?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #45088
    CodeGraphics
    Participant

    I did [this](http://codepen.io/alex13/pen/lLwKI “”) separately and it worked.
    But when I used same code in a live [website](http://www.ctrlshiftstudios.com/ChurchSite/contact.php “”) am doing, it will not show.
    What is wrong? I want the two white divs before footer to have the same drop shadow in the codepen above.

    #137587
    CrocoDillon
    Participant

    From the looks of it, it’s a z-index issue.

    @HugoGiraudel, how’s understanding z-index going, need some practice? ;)

    #137589
    Paulie_D
    Member

    >From the looks of it, it’s a z-index issue.

    Yeah…the shadows are there as you can see by turning off the `z-index:-1`.

    #137591
    CodeGraphics
    Participant

    yes. but the one of codepen has a z-index of -1.

    #137593
    Paulie_D
    Member

    >yes. but the one of codepen has a z-index of -1.

    But that’s in isolation….a lot of other elements are involved in a live web page and they all have a z-index.

    #137595
    Kitty Giraudel
    Participant

    > @HugoGiraudel, how’s understanding z-index going, need some practice? ;)

    Not so much. Don’t have enough time to work on this. :D

    #137597
    Paulie_D
    Member

    Try setting the `z-index` on the section (.clientSection) to 0. The shadows will appear but you will have to change the color to get them to look right.

    #137599
    CodeGraphics
    Participant

    @Paulie_D, woow. It worked. But come to think of it. The. clientSection was never positioned relative or absolute or fixed. I thought only these 3 positioning can have z-index by default. Does static position have z-index too. Thank u.

    #137602
    Paulie_D
    Member

    Z-index only takes **effect** when positioning is set but it still accumulates (I think).

    All I suggested was, in effect, re-setting the…erm…index.

    #137603
    Kitty Giraudel
    Participant

    > I thought only these 3 positioning can have z-index by default. Does static position have z-index too.

    One of these 3 types of positioning is required for a z-index value to be interpreted by the browser. All elements on the page have a default z-index value of auto which equals 0. So, no stacking context, except for the root element which has a different behaviour.

    #137604
    CodeGraphics
    Participant
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.