div+css 左右两列高度自适应以及父级div也跟着自适应子级的高度

代码如下:

<!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=gb2312" />
<title>左右两列高度自适应以及父级div也跟着自适应子级的高度</title>
<style type="text/css">
      #container { width:216px; height:auto;overflow: hidden; }
      #container div { float: left; width:8px; margin-bottom: -800px; padding-bottom: 800px; }
   #container .zuo{ background-image:url(http://www.616sc.com/616/f_lm.gif)}
   #container .you{ background-image:url(http://www.616sc.com/616/f_rm.gif)}
      #container .col2 {width:200px;border-bottom:#999999 1px solid}
    .clear{clear: both;}
</style>
</head>

<body>

<div >

div+css 左右两列高度自适应以及父级div也跟着自适应子级的高度

    </div>
    <div class="you"></div>
</div>

</body>

</html>

相关文章:

  • 2022-12-23
  • 2022-03-03
  • 2022-01-20
  • 2022-02-27
  • 2021-12-11
  • 2022-01-15
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案