开发者

css width adjust

开发者 https://www.devze.com 2023-03-26 01:19 出处:网络
I want that a div as开发者_开发问答 a certain width (80%) in all resolution, and browser resize this div resize too, only the width. I must work only width css, no javascript

I want that a div as开发者_开发问答 a certain width (80%) in all resolution, and browser resize this div resize too, only the width. I must work only width css, no javascript

I have this:

 #container{
    position:absolute;
    right:0px;
    top:0px;
    width:80%;
    height:401px;
    outline:solid 1px red;
}

When I resize or see in lower resolution this div becomes above others. Any ideas?

Thanks


Change z-index or change positioning, cause absolute means this div dosen't matter about other elements and can cover them.

0

精彩评论

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