开发者

How do I position a div after a div or at the bottom depending the window size? (image example)

开发者 https://www.devze.com 2023-04-03 06:53 出处:网络
I want a div to be below its sibling, if the browser window is big enough or to be at the bottom. The div1 doesn\'t have a static height of course.

I want a div to be below its sibling, if the browser window is big enough or to be at the bottom. The div1 doesn't have a static height of course.

This image is how I want to position div2 if the browser window i开发者_JAVA技巧s big

How do I position a div after a div or at the bottom depending the window size? (image example)

The following is how I want div2 to be positioned if the browser window is small.

How do I position a div after a div or at the bottom depending the window size? (image example)


You're describing a "sticky footer".

  • http://ryanfait.com/sticky-footer/
  • http://www.cssstickyfooter.com/
0

精彩评论

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