Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-23-2011, 12:31 PM   PM User | #1
cwj
New to the CF scene

 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cwj is an unknown quantity at this point
Position Fixed and Float Left with Variable Width

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
cwj
cwj is offline   Reply With Quote
Reply

Bookmarks

Tags
float, position fixed

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:15 AM.


Advertisement
Log in to turn off these ads.