Forums

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

Home Forums CSS [Solved] Masthead header background image full width responsive?

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #179102
    Crssp
    Participant

    Can anybody help me out here:
    i’ve narrowed my CSS down to this so far:

    /– Scenic Header background –/
    #masthead .inner-wrap div {
    background: url(‘/wp-content/uploads/2014/08/header-hills-bg-1200.gif’);
    background-repeat:no-repeat;
    background-position: top center;
    background-size: 100% 100%;
    margin: 0;
    padding: 0;
    }

    I can’t seem to get rid of the margin’s on the right and left, tried a few things, still no background love.
    link: http://173.254.76.115/~stateler/
    thanks for suggestions.

    #179104
    Paulie_D
    Member

    That image is not linked in the CSS that I can see…nor can I see it in the linked sites resources.

    Also #masthead .inner-wrap div is very generic…there any many divs that will match that selector.

    #179105
    Crssp
    Participant

    @Paulie_D sorry was tinkering, check it now.. thanks.

    #179107
    Paulie_D
    Member

    The div in question is inside a div which is affected by this

    
    .narrow-978 .inner-wrap {
    max-width: 978px;
    }
    

    You main container is wider than that.

    Why not make that image a background of the header itself?

    #179108
    Crssp
    Participant

    I couldn’t quite decipher the code to get it on the header itself.
    The Css syntax for that was escaping me :(
    Could not get it to appear at all, was doing something wrong, hence, when you saw it without probably.

    #179111
    Crssp
    Participant

    @Paulie_D it was the syntax of placing header before #masthead.
    I had been trying:
    #masthead header { as a handle, instead of the correct:
    header#masthead

    thanks for the suggestion.
    In my travels on troubleshooting this one, I found new to me properties for background-size.
    Cover and contain… more reading:
    https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Scaling_background_images
    Think I’m good for now then, leaving this on the back-burner probably till Monday. :)
    #3dayWeekend

    #179115
    Crssp
    Participant

    Now the next css to pull from the bag of tricks here:

    https://css-tricks.com/snippets/css/css-text-shadow/

    :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.