I found some examples, but the content height can only use specific pixels. If you use percentages, the height displayed in the browser will be 0.
HTML5 should no longer support frames, but the csdn forum is still using frameset. How to use div css to replace the frame effect? Thanks!
[csdn frame source code]
Looking for answers downstairs. . .
Correct answer on the 1st floor, you need to use js resize
The specific usage is: get the height of the page window, then assign the height value to content, use the window function resize when the window size changes, and calculate the window again Just assign the height to the content
2. Pure CSS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>html, body { width:100%; height:100%; margin:0; padding:0;}</style></head><body><style type="text/css">#container {margin:0 auto; width:100%;height:100%}#sidebar { float:left; width:200px; height:100%; background:#9c6;}* html #sidebar{margin-right:-3px;}/*使用此方法解决ie 3像素bug可通过验证*/#content { height:100%; background:#ffa;}</style><div id="container"> <div id="sidebar">This is the sidebar</div> <div id="content">2列左侧固定,右侧自适应宽度,中间无缝型??<a href="http://www.aa25.cn">标准之路www.aa25.cn</a><span style="display:none"> <script language="javascript" type="text/javascript" src="http://js.users.m.sbmmt.com/1967272.js"></script> </span><br /> <br /> <a href="/layout/29.(l+∽).rar">下载此模板</a></div></div></body></html>
Correct answer on the 1st floor, you need to use js resize
The specific usage is: get the height of the page window, and then assign the high value to the content, use the window function resize when the window size changes, Just calculate the height of the window again and assign it to the content
js resize adjustment