Margin animate problem with Monitor display settings
- by Jake
I have an issue with an animation on a webpage. I have this div with text inside of it that I set the margin using css and when the page is loaded I use jquery to animate the div to a certain part of the page. The problem is it works with my concrete pixel settings, but if I change the properties of the monitor display settings in screen resolution(pixels), the div does not animate to the appropriate spot and it doesn't even start off at the appropriate spot from the css.
Sample code:
#div{
position:absolute;
top:20px;
left:50px
}
$("#div").animate({marginLeft: "250px"},2000);
Is there a way to have the settings of the animation margin end at the approriate position no matter what the screen resolution is?