i really need some help with this:
i have a div container #green (green border) with a bg image. the div is on 100% width and the bg image with css3's -cover-. In this div is another div #red which has a position absolute and right value. i want force the #red div to have always the same distance between a motive of the bg image. means if im scaling the browser window the gap should always be the same.
my try was to divide the #red { right: 25px } css by $(window).width() and use this factor for
var factor = 0,253;
var width = $(window).width()*factor;
('#red').css('right', width);
but it does not work. hope you get my point, and every help would be much appreciated :)