css 自动高度 div
css auto height div
我正在制作一个分步预订表格,但我对容器的高度有疑问。
你可以在这里看到问题;通过第 2 步(只需单击第一个屏幕下方的 'next' 按钮)
http://staging.karlienfabre.be/pocoloco/book.html
所以,css的内容div
.wizard>.content {
background: #f3f3f3;
display: block;
margin: .5em;
min-height: 35em;
overflow: hidden;
position: relative;
width: auto;
font-family: 'Raleway', sans-serif;}
我可以将溢出更改为自动,但它只是滚动 div。我希望内容的高度在 div 中改变 'content' 的数量。所以整个表格应该适合灰色背景的内容div。
我找不到问题...
提前致谢!
K.
我认为问题在于 .content div 中的 section
标签是绝对定位的。这意味着父容器不知道它们有多大。删除 .wizard>.content>.body
上的绝对定位,它应该可以工作。
我认为问题出在 "overflow" 部分。试试看 overflow : scroll/auto
我正在制作一个分步预订表格,但我对容器的高度有疑问。 你可以在这里看到问题;通过第 2 步(只需单击第一个屏幕下方的 'next' 按钮)
http://staging.karlienfabre.be/pocoloco/book.html
所以,css的内容div
.wizard>.content {
background: #f3f3f3;
display: block;
margin: .5em;
min-height: 35em;
overflow: hidden;
position: relative;
width: auto;
font-family: 'Raleway', sans-serif;}
我可以将溢出更改为自动,但它只是滚动 div。我希望内容的高度在 div 中改变 'content' 的数量。所以整个表格应该适合灰色背景的内容div。
我找不到问题...
提前致谢!
K.
我认为问题在于 .content div 中的 section
标签是绝对定位的。这意味着父容器不知道它们有多大。删除 .wizard>.content>.body
上的绝对定位,它应该可以工作。
我认为问题出在 "overflow" 部分。试试看 overflow : scroll/auto