I have the following css.
#lll
{
float:left;
max-width:1000px;
border:1px solid;
}
#rrr
{
float:left;
width:300px;
border:1px solid;
}
ul
{
list-style:none;
}
li
{
float:left;
width:300px;
}
And my HTML is as follows
<div id="lll">
Hello
<ul>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
</ul>
</div>
<div id="rrr">
right!
</div>
JSFiddle is here http://jsfiddle.net/SN674/1/
Now what I would like to do is that when I resize the window, I would like the div#lll to be resized, but the div#rrr to stay on the right hand-side.
Right now, if I resize the window, the div#rrr comes BELOW div#lll.
How can I achieve this?
Here is how I would do it in CSS:
http://jsfiddle.net/SN674/12/
Here is one way in JQuery(how I would do it):
Short answer:
http://jsfiddle.net/SN674/4/
Detailed answer:
Step 1.
Download jQuery
Step 2.
Read this:
http://api.jquery.com/width/
http://api.jquery.com/resize/
step 3.
Check this example I made:
I hope this solves the issue for you