开发者

CSS: Position problem

开发者 https://www.devze.com 2023-02-18 06:56 出处:网络
Hey guys. Im setting a position:absolute to my UL to make it appear on the bottom of div #destaques, but isnt work. Whats going on?

Hey guys. Im setting a position:absolute to my UL to make it appear on the bottom of div #destaques, but isnt work. Whats going on?

<div id="destaques">
<ul>//stuff</ul>
<div class="banner"><img src="images/001.jpg"/></div>
<div class="banner"><img src="images/002.jp开发者_如何转开发g"/></div>
<div class="banner"><img src="images/003.jpg"/></div>
<div class="banner"><img src="images/004.jpg"/></div>
</div>

Its currently appearing on the page bottom.

        #destaques {
            margin:0;
            padding:0;
            width:1000px;
            height:250px;
            float:left;
            overflow:hidden;
        }

        #destaques .banner {
            position:absolute;
        }

        #destaques ul {
            float:left;
            border:1px solid #777;
            background:#fff;
            position:absolute;
            margin:0;
            color:#333;
            padding:0;
            right:0px;
        }

What im doing wrong?

Thanks!


You need to add:

position:relative;

to your #destaques div

0

精彩评论

暂无评论...
验证码 换一张
取 消