user1937847
user1937847

Reputation: 13

div shifts on resizing the browser window

I am new to this site, so please bare my mistakes. I want to keep the third div in the same place and a scroller should appear when window is resized instead of shifting. I can't use fixed width, because i want to add one more div below it...

 #wrapper {
float:left;
height:600px;
         }

#one {
clear:right;
float:left;
width:720px;
height:600px;
    background-color:#000;

    }

#two {
clear:right;
float:left;
width:300px;
height:300px;
    background-color:#999;

   }

   #three {
clear:right;
float:left;
width:320px;
height:300px;
    background-color:#600;

    }

   <head>
   </head>

   <body>

   <div id="wrapper">

  <div id="one">
      </div>
      <div id="two">
      </div>
      <div id="three">
      </div>

  </div>

  </body>

Upvotes: 0

Views: 289

Answers (1)

Pavlo
Pavlo

Reputation: 44889

Give #wrapper fixed width:

#wrapper {
  width: 1340px; /* 720 + 300 + 320 */
}

Upvotes: 1

Related Questions