CSS background-position 100% (right) not working as expected -
i have simple div width less 100%, background image having background-position 100% 0. instead of bg image sticking right side of div, getting cut off, , seems think actual right position edge of body, not div background is.
.bg { width:80%; height:500px; background-repeat: no-repeat; background-attachment: fixed; background-position: 100% 0; background-size: 50%; background-image: url(http://www.blackitty.net/photographs/photos/slideshow/slide/133/tofino_2013-11-24.jpg); }
i made fiddle it: http://jsfiddle.net/bobmeador/j2mwx/ upper element shows problem. below full image can see getting cut off.
any idea why seems using parent positioning rather div belongs to?
i have same result when .bg div set width 100% , inside div set 80% width. seems ignoring container widths , using overall body width 100% reference.
i tihnk problem background-attachment: fixed;
, if remove image aligns right.
Comments
Post a Comment