I want to make the block width and the offset value calculated dynamically, and not static. I understand that you need to use resize, but I do not understand how it can be implemented. Here's what I got:
$(function(){ var exp = $("#tile_shop2"); var expB = exp.width(); var expW = $(window).width(); var offset = exp.offset(); exp.css("margin-left", -((expB-expW)/2+offset.left)); });