开发者

How i can set the height of black overlay in css that all other things goes hidden?

开发者 https://www.devze.com 2023-03-24 23:29 出处:网络
i have a div who have class black_overlay. i want to set them to full on the page. in my code it\'s only goes to 1500px.

i have a div who have class black_overlay. i want to set them to full on the page. in my code it's only goes to 1500px.

the problem is that 开发者_StackOverflowif page have less height then 1500 then they goes unusually bigger if page have more height then their is no benifit to use it because i want to do this for full page.

how i can do this using css

#black_overlay 
{
    position: absolute; 
    top: 0; left: 0; 
    width: 100%;
    height: 1500px; 
    background-color: black;
    z-index: 99;
    opacity: .8; 
    filter: alpha(opacity=80); 
}


Use min-height instead of height as in given demo: http://jsfiddle.net/rathoreahsan/42wTM/

Or Use height: 100% instead of using a fixed height


The same as you did for your width:

height: 100%;
0

精彩评论

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