高度自动CSS属性

编程入门 行业动态 更新时间:2024-10-11 17:19:33
本文介绍了高度自动CSS属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是asp中的一个CSS问题。 我有一个被容器div包围的页面。这包含contenthome div,里面有flashhome div。 容器和contenthome height属性设置为auto。但是当我增加闪光灯高度时,容器和内容高度不会相应地改变。如何根据房屋高度实现自动增加和减少容器和内容高度。 我在下面插入了CSS代码。

This is a CSS question in asp. I have a page which is surrounded by container div. This contains contenthome div, with flashhome div inside it. Container and contenthome height property is set to auto. But when I increase flashhome height, container and contenthome height is not changed accordingly. How can I achieve autoincrease and decrease of container and contenthome heights depending on flashhome height. I have inserted CSS code below.

#container { width: 750px; height: auto; margin-left: auto; margin-right: auto; position: relative; border:1px; border-color: #b7b7b7; border-style: solid; } #contentHome { width: 750px; height: auto; position: relative; display: block; overflow: hidden; } #flashHome { float: left; display: block; width:485px; height: 255px; margin-left: 15px; margin-top: 5px; }

推荐答案

您好b $ b 我只是为您的查询创建小提琴。 jsfiddle/L4GDt/ [ ^ ] Flash Home div中的更改。 Hi Just i create fiddle for your query. jsfiddle/L4GDt/[^] Changes in the Flash Home div. #flashHome { position: relative; display: block; width:485px; height: 255px; margin-left: 15px; margin-top: 5px; background:#f00; }

更多推荐

高度自动CSS属性

本文发布于:2023-11-09 21:18:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573463.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   高度   CSS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!