Resizing a div relying on the position of one of its vertex

Fapoutouflate

New Member
Context of the problem: I am using a 960px grid and for now my layout looks like on this little piece of art :) But I want it actually to look more like this, where you can see that the sidebar is "visually" stuck to the left border of the window.Now it doesn't actually have to be stuck for say. All I need is make it look like it is by extending its background all the way to the left The put such a background I want to use an empty div outside the grid that will looks like this: verifying theses:
  • its (top,left) corner is (0,0)
  • its height is same as sidebar
  • it width is the distance (0,0) to (x,y) where (x,y) is top-right corner of the sidebar
NB: (x,y) moves as the windows browser is resized, which make the problem hard for me.I don't know if I made my problem clear but I hope someone will know what to do. Also please tell me if you think this approach isn't a good option.
 
Back
Top