作者FrWalk (难道)
看板Web_Design
标题[问题] height: auto;
时间Sun Mar 2 00:41:44 2008
我有以下的 CSS 程式码:
#con {
background:#003366;
width:300px;
height:300px;
}
#test1 {
background:#CCCCCC;
width:150px;
height:150px;
}
#test2 {
background:#00CC66;
width:150px;
height:auto;
}
当我写 <div id="con"><div id="test1"></div><div id="test2"></div></div>,
浏览器不管是 IE 或 Firefox,test2 区块的高度都不会自动延伸
(我以为它会自动延伸 150px,因为母组件的高度是 300px,test1 的高度是150px),
想请问怎麽无法自动延伸呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.172.62.231
1F:→ pm2001:高度设100% 03/02 01:20
2F:→ FrWalk:请问是哪里的高度呢? 03/02 01:39