I have a div with the CSS property position:absolute
. I am attempting to align it to the right using jQuery, but for some reason it is not working as expected. In the code snippet below, I am removing the left positioning and adding right:0 in order to move the div all the way to the right side of its container. When I inspect the element using Firebug, I can see that the inline style has been updated to right:0
, however, the actual positioning does not change. What could be causing this issue? View the code on http://jsfiddle.net/SJP3b/1/
$('div').css({
left: '',
right: 0
});