Div with background image inside div doesn't work properly

I have a div with background image put inside another div, instead of fit width parent div, it fit full screen. Please take a look my site to know clearly, sorry for bad english.

http://thehung.esy.es/Mozzarella/

It’s slightly difficult to know which elements you are talkign about. Which element is taking up the full width? I don’t see two divs nested inside of each other (both with background images)…Could you elaborate?

Hi,

Sorry, the part is “last friday party”, its background fitting full-screen.

Did you want position:fixed on that? I doubt it since it would obscure other elements of your page. That being said, make “.fullscreen-img” position:absolute and #video-section needs position:relative.

The other elements will need an actual z-index set…and not a negative one either :slight_smile:

I’m using video background plug-in, this code given by author. I want to adjust it but don’t know how :frowning:

HI,

It’s not clear what you are doing here.:slight_smile:

On a quick inspection surely your .fullscreen-img should be applied to the background of one of those mid page elements just like you have done with #event-section

When you use background-fixed then the background will only show when that element is over the background as shown in #event-section.

Or were you doing something different that you had already done with #event-section and its fixed background?

Hi @PaulOB

I’m confusing with background-video section :frowning:

So am I as I don’t see a video ? :smile:

You can move those images that are outside of the page by placing them as already mentioned in the thread.

e.g. Add these extra rules:

#video-section{
    min-height:500px;
    position:relative;    
}
#video-section .fullscreen-img{
    position:absolute;
    top:0;
    left:0    
}

I don’t know how that ties in with the video you mentioned so you may need to direct us towards the documentation for the plugin you are using if the above is not what you wanted.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.