Make child div stretch across width of page

后端 未结 12 704
鱼传尺愫
鱼传尺愫 2020-12-13 09:24

Suppose I have the following HTML code:

12条回答
  •  渐次进展
    2020-12-13 09:32

    You could do it with jQuery...

    $("#help_panel").width($(window).width());
    

    Otherwise, as far as css goes, I'm fairly sure you would have to sit the help_panel div on the outside of container using position:absolute styling: http://css-tricks.com/forums/discussion/2318/give-child-div-width%3A100-of-page-width-inside-parent./p1

提交回复
热议问题