布局自适应问题
时间:2010-09-25
来源:互联网
<!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" /> <style type="text/css"> <!-- body {margin:10px auto;padding:0;font-size:12px;font-family:Arial, Helvetica, sans-serif;} .read_t {width:950px;min-height:522px;height:auto !important;height:522px;overflow:visible;border:1px solid #bbd4e3;margin:0 auto;padding:0;} .read_t:after {visibility: hidden;display: block;font-size: 0;content: " ";clear: both;height: 0;} .read_t {*zoom:1;} .read_l {width:160px;background:red;float:left;padding-top:8px;} .read_r {width:769px;padding:5px 10px;background:#ccc;float:left;min-height:522px;height:auto !important;height:522px;overflow:visible;} </style> </head> <body> <div class="read_t"> <div class="read_l"></div> <div class="read_r"></div> </div> </body> </html>
提示:您可以先修改部分代码再运行
因为read_t设置了min-height,而read_r的高度是根据文章的长度而定的,如何让左侧的高度跟右侧的一样 提示:您可以先修改部分代码再运行
作者: rainbowbin 发布时间: 2010-09-25
只能左侧包含右侧的 左侧的高度才能和右侧的同时变化,设置样式的时候就不能这么设置了,比如线就只能设置左侧的右边线,单独设置样式。可以试试。
作者: dohaming 发布时间: 2010-09-25
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28