Answer the question
In order to leave comments, you need to log in
Why is the background image cut off at the edges?
Greetings! There is a demo site in the header of which a background parallax image is placed, but the problem is that it is cut off at the edges due to an incorrect height-width ratio (even background-size:cover does not help.
I'm trying to fix it using a script by setting the height-to-width ratio , but I get the effect is not the one I expect - what to do?
( function( $ ) {
$('header').height($('header').width()/1.5);
$(window).resize(function(){
$('header').height($('header').width()/1.5);
});
} )( jQuery );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question