Home  >  Article  >  Web Front-end  >  How to make the right layer increase as the height of the left column increases? _html/css_WEB-ITnose

How to make the right layer increase as the height of the left column increases? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:06:32788browse

5d1e94760349a02ec7e3e05385bc999a
0408d29daeaa1cd46a8559e557760641sdfsdf16b28748ea4df4d9c2150843fecfba68
2599c84ca173ba4c479313ffa3421831sdfsf16b28748ea4df4d9c2150843fecfba68
16b28748ea4df4d9c2150843fecfba68


Reply to discussion (solution)

Equal height layout

<!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>.box{width:800px;margin:100px auto;overflow:hidden;}.left{width:300px;background:red;padding-bottom:2000px;margin-bottom:-2000px;float:left;}.right{width:500px;background:green;padding-bottom:2000px;margin-bottom:-2000px;float:left;}</style></head><body><div class="box">	<div class="left">    	尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容        尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容    </div>    <div class="right"></div></div></body></html>

Equal height layout

<!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>.box{width:800px;margin:100px auto;overflow:hidden;}.left{width:300px;background:red;padding-bottom:2000px;margin-bottom:-2000px;float:left;}.right{width:500px;background:green;padding-bottom:2000px;margin-bottom:-2000px;float:left;}</style></head><body><div class="box">	<div class="left">    	尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容        尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容尝试添加内容    </div>    <div class="right"></div></div></body></html>

What if there is a border?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn