开发者

Div gets re-positioned when browser window is resized

开发者 https://www.devze.com 2023-03-14 16:30 出处:网络
I have several divs that I set up to be positioned next to each other. However, when I resize the window to be smaller, the 2nd and third div from the left drops below the first one. How do I make it

I have several divs that I set up to be positioned next to each other. However, when I resize the window to be smaller, the 2nd and third div from the left drops below the first one. How do I make it so that instead of dropping underneath the first div, the browser开发者_JAVA百科 would show she horizontal scroll bar?


Do you have fixed width set to these divs?

Please post your html code of the divs

Either you need to put a width to the parent container div as suggested by Arun or post your html to let us see


Set the width of the parent div to some value.

<div style="width: 700px">
  <div>Content1</div>
  <div>Conten2</div>
  <div>Conten3</div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消