CSS Float:2个Divs,1个div = Nav,1个div =产品。全高NAV怎么办? [英] CSS Float : 2 Divs, 1 div = Nav, 1 div = product. Full height NAV how to do this?

查看:82
本文介绍了CSS Float:2个Divs,1个div = Nav,1个div =产品。全高NAV怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用float设置以下内容。
一切正常,除了导航div不是全高。

I want to setup the following using float. Everything worked out fine except the nav div is not full height.

屏幕截图: http://postimg.org/image/gywuh9lv1/

HTML:

<div class='container'>
<div class='left'>NAV PANEL FULL HEIGHT, ADJUST TO AMOUNTS OF PRODUCTS</div>
 <div class='right'>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
  <div class='product'>PRODUCTS</div>
 </div>
</div>

CSS:

float: left;

仅供参考:
最低高度:100%;

Just for info : min-height:100%; NOT working.

例如:height:500px;可以,但是这不是动态的,如果我的页面上有更多内容,那么它已经失败了。

For example : height:500px; is working but this is not dynamic, if my page has more content then it already fails.

推荐答案

height:100%仅在您的 html & body 也是 height:100%

height:100% will only work if your html & body are height:100% too ;

< a href = http://codepen.io/GuillaumeGautier/pen/RNrXOQ rel = nofollow>这里是Codepen的一个例子

这篇关于CSS Float:2个Divs,1个div = Nav,1个div =产品。全高NAV怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆