Place div elements on responsive background (Bootstrap 3)

对着背影说爱祢 提交于 2019-12-10 10:03:32

问题


I would like to place div's (input form) on a responsive background.

I'm using Bootstrap 3 for the page template. But if I resize the window or use another screen size the elements are on another place. How could I fix this common issue?

Example: http://goo.gl/D7TwIP

Thanks!


回答1:


Instead of using margin-top and margin-left use top and left properties on a positioned absolute element.

top: 540px;
left: 117px;
position: absolute;

Also make sure the parent element is set to position relative.

position: relative;


来源:https://stackoverflow.com/questions/23714126/place-div-elements-on-responsive-background-bootstrap-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!