might not help but i did those window resize once for one of my objects. was always at the right place after resize.
$(window).resize(function() { //footer var leftabstand = $(".footer_08").offset(); var width = $(".footer_08").width(); var left= leftabstand.left + width; $(".footers").css("left",left); }); On 18 Mai, 03:07, dPO <dporigin...@gmail.com> wrote: > Hey i am trying to create a plugin that changes the css of a div > according to size of window. > > I cant use a % based layout because it causes a gap in the layout that > i dont like. > > a small description of the script would be something like this: > > windowwidth = 1000px > > calculation = 1000(windowwidth) - 300 (this is for columns) / 150(this > is for child elemnts that fit div) = 4.66(answer from this sample > data) > > if calculation = 4 (use integer only) > > then element width = 600px > > if calculation = 5 > > then element width = 752px > > if calculation = 6 > > then element width = 904px > > and so on. > > I don't have much knowledge with writing my own scripts only the > basics of taking premade scripts and modifying them to my needs so if > someone can help me with this it will be much appreciated. > > here is a tutorial that might be of help with > this.http://net.tutsplus.com/videos/screencasts/learn-how-to-create-a-jque... > > Thanks, > dP