View Full Version : Position Fixed and Float Left with Variable Width

11-23-2011, 01:31 PM
I have an image on the left side of the page which I want to be position:fixed and then have the content to the right.

I know I could add a left margin to the content but the image also changes height, and thus width, when a user resizes the window so that it is always 100% of the window height.

How can I make the content move left and right to stay the same distance to the right of the image no matter what width it is? In other words, how can I make the content act as if it is floated? Would I have to use JavaScript?

Here is a jsFiddle to demonstrate what I mean: http://jsfiddle.net/NAnK4/1/

Cheers in advance