treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Background Position with Negative Percentage

  • I was doing a weird experiment (just fill out my spare time). Create an image transition effect with extra elements such as Nivo Slider. Each image consists of 10 pieces. My knowledge this will be more effective if the size of the width and the left value is converted to a percentage so that it becomes more responsive.

    The problem is, I can't write a negative percentage in the background-position. Is there a technique to change the CSS background-position with negative percentages?

    like this:
    background-position: -10% 0px;


    (???)
  • yeah that should move it 10 percent to the left. Not sure y that wouldn't be working or what context your using it in exactly.

    try setting up a jsfiddle or tinkerbin to illustrate your problem.
  • No. I can't do that. I get the failed results.