How do I resize a div automatically to the size of its contents when the contents of the div have changed?

后端 未结 3 750
庸人自扰
庸人自扰 2021-01-06 02:58

At the moment, I have this DIV with a registration form centered over the page. The contents of the DIV come from an ascx-page. This is done nicely. Now, if the user tries t

3条回答
  •  半阙折子戏
    2021-01-06 03:28

    Old fashioned tables are (still) great at centering things, fast, fluid and code free.

    
    
    CSS: HTML,BODY {height:100%; width:100%}
    

    提交回复
    热议问题
    your Content