• Resolved jazzbrass

    (@jazzbrass)


    Very new to css. I want to give my header image and content a subtle shadow so it’s not flat with my background image. I’ve successfully done this with my header image with a simple:

    .site-title img {
    box-shadow: -1px 0px 18px 4px black;
    }

    However, when I try to create a similar box-shadow around my main content, it seems like the shadow is displaced at the top. The shadow starts a few pixels above where it should.

    I thought I’d ask the forums before I start messing too much with things I know very little about. Here’s what my content css looks like:

    .site-content {
        clear: both;
        width: 90%;
        max-width: 1140px;
        margin: 0 auto;
        color: #333;
        position: relative;
        box-shadow: -1px 0px 18px 4px black;
    }

    https://www.nickborges.org

    Thank you very much in advance for any advice!

    (edit: I just noticed that other MAIN pages have correct shadow, it’s just my home page and individual blog posts that have that top floating shadow. Hope that helps.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jazzbrass

    (@jazzbrass)

    RESOLVED

    Turns out there was a “margin-top 9px;” under the box-wrap of my main content. Welp… Hope this is useful to some other rookie.

    I looked at a single post and the shadow looks the same on all edges. What may help is a couple screenshots showing a correct looking shadow and an incorrect one.

    FYI I’m using Firefox 35.0 to look at it.

    LOL, you fixed it before I looked. Might go ahead and mark the thread as resolved then.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Basic box-shadow troubleshoot’ is closed to new replies.