
HTML------<div ID="header"></div><div ID="left_sIDe"> </div><div ID="content"></divCSS-----body { wIDth: 100%; height: auto; padding: 0; margin: 0px auto; Font-family: Calibri,Georgia,Ubuntu-C; Font-size: 16px; margin-bottom: 20PX}#header{ wIDth: 100%; height: 139px; background-image: url('images/header_grey.gif'); }#left_sIDe{ wIDth: 210px; height: 700px; background-image: url('images/left_sIDe.gif'); background-repeat:repeat-y; overflow:hidden; position:absolute; Font-size: 16px;}#content{ height: auto; padding: 20px; margin-left: 230px; margin-right: 20px; padding-bottom: 30px }解决方法 溢出:自动;需要时添加滚动条 #header{ wIDth: 100%; height: 139px; background-image: url('images/header_grey.gif'); overflow: hIDden; //code added to prevent scroll}#left_sIDe{ wIDth: 210px; height: 700px; background-image: url('images/left_sIDe.gif'); background-repeat:repeat-y; overflow:hidden; //code added to prevent scroll position:absolute; Font-size: 16px;}#content{ height: auto; padding: 20px; margin-left: 230px; margin-right: 20px; padding-bottom: 30px; overflow: auto; //code added } 总结 以上是内存溢出为你收集整理的html – 只滚动内容div,其他应该是固定的全部内容,希望文章能够帮你解决html – 只滚动内容div,其他应该是固定的所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)