I have a div with
left
right
#check { left:50px; top:20px; position:relative; width:100px; height:100px; background:rgb(100,200,0); }
$(document).ready(function(){ $('#check').css('right','20px'); });
You have to set left to default, and the value for right:
$(document).ready(function(){ $('#check').css({ 'right':'20px', 'left': 'auto' }); });
JSfiddle thanks to MackieeE